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

Method getBlock

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

Source from the content-addressed store, hash-verified

293}
294
295func (this *BlockCache) getBlock(blockHeight uint32) (uint64, *types.Block,
296 common.Uint256) {
297 blockInfo, ok := this.blocksCache[blockHeight]
298 if !ok {
299 return 0, nil, common.UINT256_EMPTY
300 }
301 return blockInfo.nodeID, blockInfo.block, blockInfo.merkleRoot
302}
303
304func (this *BlockCache) delBlockLocked(blockHeight uint32) {
305 blockInfo, ok := this.blocksCache[blockHeight]

Callers 1

getBlockCacheMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected