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

Method fetchNodeList

blockproducer/blocknode.go:72–83  ·  view source on GitHub ↗

fetchNodeList returns the block node list within range [from, n.count] from node head n.

(from uint32)

Source from the content-addressed store, hash-verified

70
71// fetchNodeList returns the block node list within range [from, n.count] from node head n.
72func (n *blockNode) fetchNodeList(from uint32) (bl []*blockNode) {
73 if n.count < from {
74 return
75 }
76 bl = make([]*blockNode, n.count-from+1)
77 var iter = n
78 for i := len(bl) - 1; i >= 0; i-- {
79 bl[i] = iter
80 iter = iter.parent
81 }
82 return
83}
84
85func (n *blockNode) ancestor(h uint32) *blockNode {
86 if h > n.height {

Callers 5

TestBlockNodeFunction · 0.80
newBranchFunction · 0.80
sprintMethod · 0.80
NewChainWithContextFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestBlockNodeFunction · 0.64