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

Function heightToKey

sqlchain/chain.go:76–80  ·  view source on GitHub ↗

heightToKey converts a height in int32 to a key in bytes.

(h int32)

Source from the content-addressed store, hash-verified

74
75// heightToKey converts a height in int32 to a key in bytes.
76func heightToKey(h int32) (key []byte) {
77 key = make([]byte, 4)
78 binary.BigEndian.PutUint32(key, uint32(h))
79 return
80}
81
82// keyWithSymbolToHeight converts a height back from a key(ack/resp/req/block) in bytes.
83// ack key:

Callers 1

pushAckedQueryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected