Versions in this module Expand all Collapse all v8 v8.0.2 Jun 27, 2022 v8.0.1 Jun 27, 2022 Changes in this version + var ErrAncestorAtGenesis = errors.New("no ancestor: at genesis") + var ErrAncestorMaxChainLength = errors.New("no ancestor: max chain length reached") + func APITransaction(client txhelpers.VerboseTransactionGetter, txid *chainhash.Hash) (tx *apitypes.Tx, hex string, err error) + func BuildBlockHeaderVerbose(header *wire.BlockHeader, params *chaincfg.Params, currentHeight int64, ...) *chainjson.GetBlockHeaderVerboseResult + func CommonAncestor(client BlockFetcher, hashA, hashB chainhash.Hash) (*chainhash.Hash, []chainhash.Hash, []chainhash.Hash, error) + func ConnectNodeRPC(host, user, pass, cert string, disableTLS, disableReconnect bool, ...) (*rpcclient.Client, semver.Semver, error) + func DisableLog() + func GetBlock(ind int64, client BlockFetcher) (*dcrutil.Block, *chainhash.Hash, error) + func GetBlockByHash(blockhash *chainhash.Hash, client BlockFetcher) (*dcrutil.Block, error) + func GetBlockHeaderVerbose(client BlockFetcher, idx int64) *chainjson.GetBlockHeaderVerboseResult + func GetBlockHeaderVerboseByString(client BlockFetcher, hash string) *chainjson.GetBlockHeaderVerboseResult + func GetBlockVerbose(client *rpcclient.Client, idx int64, verboseTx bool) *chainjson.GetBlockVerboseResult + func GetBlockVerboseByHash(client *rpcclient.Client, hash string, verboseTx bool) *chainjson.GetBlockVerboseResult + func GetChainWork(client BlockFetcher, hash *chainhash.Hash) (string, error) + func GetStakeDiffEstimates(client *rpcclient.Client) *apitypes.StakeDiff + func GetTransactionVerboseByID(client txhelpers.VerboseTransactionGetter, txhash *chainhash.Hash) (*chainjson.TxRawResult, error) + func OrphanedTipLength(ctx context.Context, client BlockHashGetter, tipHeight int64, ...) (int64, error) + func SearchRawTransaction(client *rpcclient.Client, params *chaincfg.Params, count int, address string) ([]*chainjson.SearchRawTransactionsResult, error) + func SideChainFull(client BlockFetcher, tipHash string) ([]string, error) + func SideChains(client *rpcclient.Client) ([]chainjson.GetChainTipsResult, error) + func UnconfirmedTxnsForAddress(client *rpcclient.Client, address string, params *chaincfg.Params) (*txhelpers.AddressOutpoints, int64, error) + func UseLogger(logger slog.Logger) + type BlockFetcher interface + GetBestBlock func() (*chainhash.Hash, int64, error) + GetBlock func(blockHash *chainhash.Hash) (*wire.MsgBlock, error) + GetBlockHash func(blockHeight int64) (*chainhash.Hash, error) + GetBlockHeaderVerbose func(hash *chainhash.Hash) (*chainjson.GetBlockHeaderVerboseResult, error) + type BlockGate struct + func NewBlockGate(client BlockFetcher, capacity int) *BlockGate + func (g *BlockGate) BestBlock() (*dcrutil.Block, error) + func (g *BlockGate) BestBlockHash() (chainhash.Hash, int64, error) + func (g *BlockGate) BestBlockHeight() int64 + func (g *BlockGate) Block(hash chainhash.Hash) (*dcrutil.Block, error) + func (g *BlockGate) CachedBlock(hash chainhash.Hash) (*dcrutil.Block, error) + func (g *BlockGate) Client() BlockFetcher + func (g *BlockGate) GetChainWork(hash *chainhash.Hash) (string, error) + func (g *BlockGate) NodeHeight() (int64, error) + func (g *BlockGate) SetFetchToHeight(height int64) + func (g *BlockGate) UpdateToBestBlock() (*dcrutil.Block, error) + func (g *BlockGate) UpdateToBlock(height int64) (*dcrutil.Block, error) + func (g *BlockGate) UpdateToNextBlock() (*dcrutil.Block, error) + func (g *BlockGate) WaitForHash(hash chainhash.Hash) chan int64 + func (g *BlockGate) WaitForHeight(height int64) chan chainhash.Hash + type BlockGetter interface + BestBlock func() (*dcrutil.Block, error) + BestBlockHash func() (chainhash.Hash, int64, error) + BestBlockHeight func() int64 + Block func(chainhash.Hash) (*dcrutil.Block, error) + GetChainWork func(*chainhash.Hash) (string, error) + NodeHeight func() (int64, error) + WaitForHash func(chainhash.Hash) chan int64 + WaitForHeight func(int64) chan chainhash.Hash + type BlockHashGetter interface + GetBlockHash func(int64) (*chainhash.Hash, error) + type BlockPrefetchClient struct + func NewBlockPrefetchClient(f BlockFetcher) *BlockPrefetchClient + func (p *BlockPrefetchClient) GetBestBlock() (*chainhash.Hash, int64, error) + func (p *BlockPrefetchClient) GetBlock(hash *chainhash.Hash) (*wire.MsgBlock, error) + func (p *BlockPrefetchClient) GetBlockData(hash *chainhash.Hash) (*wire.MsgBlock, *chainjson.GetBlockHeaderVerboseResult, error) + func (p *BlockPrefetchClient) GetBlockHash(blockHeight int64) (*chainhash.Hash, error) + func (p *BlockPrefetchClient) GetBlockHeaderVerbose(hash *chainhash.Hash) (*chainjson.GetBlockHeaderVerboseResult, error) + func (p *BlockPrefetchClient) HaveBlockHash(hash chainhash.Hash) bool + func (p *BlockPrefetchClient) HaveBlockHeight(height uint32) bool + func (p *BlockPrefetchClient) Hits() uint64 + func (p *BlockPrefetchClient) Misses() uint64 + func (p *BlockPrefetchClient) RetrieveAndStoreNext(nextHash *chainhash.Hash) + func (p *BlockPrefetchClient) Stop() + type MasterBlockGetter interface + UpdateToBestBlock func() (*dcrutil.Block, error) + UpdateToBlock func(height int64) (*dcrutil.Block, error) + UpdateToNextBlock func() (*dcrutil.Block, error) + type MempoolAddressChecker interface + UnconfirmedTxnsForAddress func(address string) (*txhelpers.AddressOutpoints, int64, error) + func NewMempoolAddressChecker(client *rpcclient.Client, params *chaincfg.Params) MempoolAddressChecker Other modules containing this package github.com/Decred-Next/dcrndata github.com/Decred-Next/dcrndata/rpcutils/v8