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

Method delBlockLocked

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

Source from the content-addressed store, hash-verified

302}
303
304func (this *BlockCache) delBlockLocked(blockHeight uint32) {
305 blockInfo, ok := this.blocksCache[blockHeight]
306 if ok {
307 if blockInfo.block.Header.TransactionsRoot == common.UINT256_EMPTY {
308 this.emptyBlockAmount -= 1
309 }
310 }
311 delete(this.blocksCache, blockHeight)
312}
313
314func (this *BlockCache) isInBlockCache(blockHeight uint32) bool {
315 _, ok := this.blocksCache[blockHeight]

Callers 3

addBlockMethod · 0.95
clearBlocksMethod · 0.95
delBlockCacheMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected