MCPcopy Create free account
hub / github.com/CPChain/chain / GetBlockHashesFromHash

Method GetBlockHashesFromHash

core/blockchain.go:1896–1898  ·  view source on GitHub ↗

GetBlockHashesFromHash retrieves a number of block hashes starting at a given hash, fetching towards the genesis block.

(hash common.Hash, max uint64)

Source from the content-addressed store, hash-verified

1894// GetBlockHashesFromHash retrieves a number of block hashes starting at a given
1895// hash, fetching towards the genesis block.
1896func (bc *BlockChain) GetBlockHashesFromHash(hash common.Hash, max uint64) []common.Hash {
1897 return bc.hc.GetBlockHashesFromHash(hash, max)
1898}
1899
1900// GetAncestor retrieves the Nth ancestor of a given block. It assumes that either the given block or
1901// a close ancestor of it is canonical. maxNonCanonical points to a downwards counter limiting the

Callers 1

TestGetBlockHeadersFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestGetBlockHeadersFunction · 0.36