MCPcopy Create free account
hub / github.com/DNAProject/DNA / addBlockCache

Method addBlockCache

p2pserver/block_sync.go:677–682  ·  view source on GitHub ↗
(nodeID uint64, block *types.Block,
	merkleRoot common.Uint256)

Source from the content-addressed store, hash-verified

675}
676
677func (this *BlockSyncMgr) addBlockCache(nodeID uint64, block *types.Block,
678 merkleRoot common.Uint256) bool {
679 this.lock.Lock()
680 defer this.lock.Unlock()
681 return this.blocksCache.addBlock(nodeID, block, merkleRoot)
682}
683
684func (this *BlockSyncMgr) getBlockCache(blockHeight uint32) (uint64, *types.Block,
685 common.Uint256) {

Callers 2

OnHeaderReceiveMethod · 0.95
OnBlockReceiveMethod · 0.95

Calls 1

addBlockMethod · 0.80

Tested by

no test coverage detected