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

Method getBlockCache

p2pserver/block_sync.go:684–689  ·  view source on GitHub ↗
(blockHeight uint32)

Source from the content-addressed store, hash-verified

682}
683
684func (this *BlockSyncMgr) getBlockCache(blockHeight uint32) (uint64, *types.Block,
685 common.Uint256) {
686 this.lock.RLock()
687 defer this.lock.RUnlock()
688 return this.blocksCache.getBlock(blockHeight)
689}
690
691func (this *BlockSyncMgr) delBlockCache(blockHeight uint32) {
692 this.lock.Lock()

Callers 1

saveBlockMethod · 0.95

Calls 1

getBlockMethod · 0.45

Tested by

no test coverage detected