func (c *BitcoindClient) GetBlock(hash *chainhash.Hash) (*wire.MsgBlock, error) {
	return c.chainConn.client.GetBlock(hash)
}
GetBlock returns a block from the hash.
package chain
import (
	"container/list"
	"encoding/hex"
	"errors"
	"fmt"
	"sync"
	"sync/atomic"
	"time"
	"github.com/gcash/bchd/btcjson"
	"github.com/gcash/bchd/chaincfg"
	"github.com/gcash/bchd/chaincfg/chainhash"
	"github.com/gcash/bchd/txscript"
	"github.com/gcash/bchd/wire"
	"github.com/gcash/bchutil"
	"github.com/gcash/bchwallet/waddrmgr"
	"github.com/gcash/bchwallet/wtxmgr"
)
var (
	ErrBitcoindClientShuttingDown = errors.New("client is shutting down")
)
type BitcoindClient struct {
	notifyBlocks uint32
	started int32  
	stopped int32  
	birthday time.Time
	chainParams *chaincfg.Params
	id uint64
	chainConn *BitcoindConn
	bestBlockMtx sync.RWMutex
	bestBlock    waddrmgr.BlockStamp
	rescanUpdate chan interface{}
	watchMtx         sync.RWMutex
	watchedAddresses map[string]struct{}
	watchedOutPoints map[wire.OutPoint]struct{}
	watchedTxs       map[chainhash.Hash]struct{}
	mempool map[chainhash.Hash]struct{}
	expiredMempool map[int32]map[chainhash.Hash]struct{}
	notificationQueue *ConcurrentQueue
	zmqTxNtfns chan *wire.MsgTx
	zmqBlockNtfns chan *wire.MsgBlock
	quit chan struct{}
	wg   sync.WaitGroup
}
var _ Interface = (*BitcoindClient)(nil)
func (c *BitcoindClient) BackEnd() string {
	return "bitcoind"
}
func (c *BitcoindClient) GetBestBlock() (*chainhash.Hash, int32, error) {
	bcinfo, err := c.chainConn.client.GetBlockChainInfo()
	if err != nil {
		return nil, 0, err
	}
	hash, err := chainhash.NewHashFromStr(bcinfo.BestBlockHash)
	if err != nil {
		return nil, 0, err
	}
	return hash, bcinfo.Blocks, nil
}
func (c *BitcoindClient) GetBlockHeight(hash *chainhash.Hash) (int32, error) {
	header, err := c.chainConn.client.GetBlockHeaderVerbose(hash)
	if err != nil {
		return 0, err
	}
	return header.Height, nil
}