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

Method CurrentHeader

core/blockchain.go:1872–1874  ·  view source on GitHub ↗

CurrentHeader retrieves the current head header of the canonical chain. The header is retrieved from the HeaderChain's internal cache.

()

Source from the content-addressed store, hash-verified

1870// CurrentHeader retrieves the current head header of the canonical chain. The
1871// header is retrieved from the HeaderChain's internal cache.
1872func (bc *BlockChain) CurrentHeader() *types.Header {
1873 return bc.hc.CurrentHeader()
1874}
1875
1876// GetHeader retrieves a block header from the database by hash and number,
1877// caching it if found.

Calls 1

CurrentHeaderMethod · 0.65