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

Method CurrentFastBlock

core/blockchain.go:485–487  ·  view source on GitHub ↗

CurrentFastBlock retrieves the current fast-sync head block of the canonical chain. The block is retrieved from the blockchain's internal cache.

()

Source from the content-addressed store, hash-verified

483// CurrentFastBlock retrieves the current fast-sync head block of the canonical
484// chain. The block is retrieved from the blockchain's internal cache.
485func (bc *BlockChain) CurrentFastBlock() *types.Block {
486 return bc.currentFastBlock.Load().(*types.Block)
487}
488
489// SetProcessor sets the processor required for making state modifications.
490func (bc *BlockChain) SetProcessor(processor Processor) {

Callers 5

loadLastStateMethod · 0.95
SetHeadMethod · 0.95
CurrentBlockMethod · 0.95
RollbackMethod · 0.95
InsertReceiptChainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected