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

Method getHeaderIndexListKey

core/store/ledgerstore/block_store.go:506–511  ·  view source on GitHub ↗
(startHeight uint32)

Source from the content-addressed store, hash-verified

504}
505
506func (this *BlockStore) getHeaderIndexListKey(startHeight uint32) []byte {
507 sink := common.NewZeroCopySink(nil)
508 sink.WriteByte(byte(scom.IX_HEADER_HASH_LIST))
509 sink.WriteUint32(startHeight)
510 return sink.Bytes()
511}
512
513func (this *BlockStore) getStartHeightByHeaderIndexKey(key []byte) (uint32, error) {
514 reader := bytes.NewReader(key[1:])

Callers 1

SaveHeaderIndexListMethod · 0.95

Calls 3

WriteByteMethod · 0.95
WriteUint32Method · 0.95
BytesMethod · 0.95

Tested by

no test coverage detected