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

Method GetHeaderByHash

core/blockchain.go:1884–1886  ·  view source on GitHub ↗

GetHeaderByHash retrieves a block header from the database by hash, caching it if found.

(hash common.Hash)

Source from the content-addressed store, hash-verified

1882// GetHeaderByHash retrieves a block header from the database by hash, caching it if
1883// found.
1884func (bc *BlockChain) GetHeaderByHash(hash common.Hash) *types.Header {
1885 return bc.hc.GetHeaderByHash(hash)
1886}
1887
1888// HasHeader checks if a block header is present in the database or not, caching
1889// it if present.

Callers 2

NewBlockChainFunction · 0.95
loadLastStateMethod · 0.95

Calls 1

GetHeaderByHashMethod · 0.65

Tested by

no test coverage detected