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

Method ContainBlock

core/store/ledgerstore/block_cache.go:81–83  ·  view source on GitHub ↗

ContainBlock return whether block is in cache

(blockHash common.Uint256)

Source from the content-addressed store, hash-verified

79
80//ContainBlock return whether block is in cache
81func (this *BlockCache) ContainBlock(blockHash common.Uint256) bool {
82 return this.blockCache.Contains(string(blockHash.ToArray()))
83}
84
85//AddTransaction add transaction to block cache
86func (this *BlockCache) AddTransaction(tx *types.Transaction, height uint32) {

Callers 2

IsContainBlockMethod · 0.45

Calls 1

ToArrayMethod · 0.65

Tested by

no test coverage detected