MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / newNonCacheBlockNode

Function newNonCacheBlockNode

blockproducer/blocknode.go:57–61  ·  view source on GitHub ↗

newNonCacheBlockNode returns a block node without the *types.BPBlock cached.

(h uint32, b *types.BPBlock, p *blockNode)

Source from the content-addressed store, hash-verified

55
56// newNonCacheBlockNode returns a block node without the *types.BPBlock cached.
57func newNonCacheBlockNode(h uint32, b *types.BPBlock, p *blockNode) (node *blockNode) {
58 node = newBlockNode(h, b, p)
59 node.clear()
60 return
61}
62
63func (n *blockNode) load() *types.BPBlock {
64 return n.block.Load().(*types.BPBlock)

Callers 1

loadBlocksFunction · 0.85

Calls 2

newBlockNodeFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected