MCPcopy Create free account
hub / github.com/DNAProject/DNA / getBlockHashKey

Method getBlockHashKey

core/store/ledgerstore/block_store.go:487–492  ·  view source on GitHub ↗
(height uint32)

Source from the content-addressed store, hash-verified

485}
486
487func (this *BlockStore) getBlockHashKey(height uint32) []byte {
488 key := make([]byte, 5, 5)
489 key[0] = byte(scom.DATA_BLOCK)
490 binary.LittleEndian.PutUint32(key[1:], height)
491 return key
492}
493
494func (this *BlockStore) getCurrentBlockKey() []byte {
495 return []byte{byte(scom.SYS_CURRENT_BLOCK)}

Callers 2

GetBlockHashMethod · 0.95
SaveBlockHashMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected