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

Method GetHeader

core/blockchain.go:1878–1880  ·  view source on GitHub ↗

GetHeader retrieves a block header from the database by hash and number, caching it if found.

(hash common.Hash, number uint64)

Source from the content-addressed store, hash-verified

1876// GetHeader retrieves a block header from the database by hash and number,
1877// caching it if found.
1878func (bc *BlockChain) GetHeader(hash common.Hash, number uint64) *types.Header {
1879 return bc.hc.GetHeader(hash, number)
1880}
1881
1882// GetHeaderByHash retrieves a block header from the database by hash, caching it if
1883// found.

Callers 1

RollbackMethod · 0.95

Calls 1

GetHeaderMethod · 0.65

Tested by

no test coverage detected