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

Method indexKey

sqlchain/blockindex.go:98–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98func (n *blockNode) indexKey() (key []byte) {
99 key = make([]byte, hash.HashSize+4)
100 binary.BigEndian.PutUint32(key[0:4], uint32(n.height))
101 copy(key[4:hash.HashSize+4], n.hash[:])
102 return
103}
104
105type blockIndex struct {
106 mu sync.RWMutex

Callers 4

FetchBlockByCountMethod · 0.95
TestIndexKeyFunction · 0.80
pushBlockMethod · 0.80
FetchBlockMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestIndexKeyFunction · 0.64