MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / hasAncestorWithMinCount

Method hasAncestorWithMinCount

blockproducer/blocknode.go:131–142  ·  view source on GitHub ↗
(
	blockHash hash.Hash, minCount uint32)

Source from the content-addressed store, hash-verified

129}
130
131func (n *blockNode) hasAncestorWithMinCount(
132 blockHash hash.Hash, minCount uint32) (match *blockNode, ok bool,
133) {
134 for match = n; match != nil && match.count >= minCount; match = match.parent {
135 if match.hash.IsEqual(&blockHash) {
136 ok = true
137 return
138 }
139 }
140 match = nil
141 return
142}

Callers 2

TestBlockNodeFunction · 0.80
applyBlockMethod · 0.80

Calls 1

IsEqualMethod · 0.45

Tested by 1

TestBlockNodeFunction · 0.64