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

Method clearBlocks

p2pserver/block_sync.go:287–293  ·  view source on GitHub ↗
(curBlockHeight uint32)

Source from the content-addressed store, hash-verified

285}
286
287func (this *BlockCache) clearBlocks(curBlockHeight uint32) {
288 for height := range this.blocksCache {
289 if height < curBlockHeight {
290 this.delBlockLocked(height)
291 }
292 }
293}
294
295func (this *BlockCache) getBlock(blockHeight uint32) (uint64, *types.Block,
296 common.Uint256) {

Callers 1

clearBlocksMethod · 0.45

Calls 1

delBlockLockedMethod · 0.95

Tested by

no test coverage detected