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

Method KnownHead

core/blockchain.go:310–315  ·  view source on GitHub ↗

KnownHead returns hash and number of current head block (maybe not in local chain)

()

Source from the content-addressed store, hash-verified

308
309// KnownHead returns hash and number of current head block (maybe not in local chain)
310func (bc *BlockChain) KnownHead() (common.Hash, uint64) {
311 bc.knownHeadLock.RLock()
312 defer bc.knownHeadLock.RUnlock()
313
314 return bc.knownHeadHash, bc.knownHeadNumber
315}
316
317// SetKnownHead sets the known head block hash and number
318func (bc *BlockChain) SetKnownHead(hash common.Hash, number uint64) {

Callers 2

InsertChainMethod · 0.95
insertChainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected