func constructBlockNumTranNumKey(blockNum uint64, txNum uint64) []byte { blkNumBytes := util.EncodeOrderPreservingVarUint64(blockNum) tranNumBytes := util.EncodeOrderPreservingVarUint64(txNum) key := append(blkNumBytes, tranNumBytes...) return append([]byte{blockNumTranNumIdxKeyPrefix}, key...) }
func encodeBucketNumber(bucketNumber int) []byte { return util.EncodeOrderPreservingVarUint64(uint64(bucketNumber)) }
func constructBlockNumKey(blockNum uint64) []byte { blkNumBytes := util.EncodeOrderPreservingVarUint64(blockNum) return append([]byte{blockNumIdxKeyPrefix}, blkNumBytes...) }
// ToBytes serializes the Height func (h *Height) ToBytes() []byte { blockNumBytes := util.EncodeOrderPreservingVarUint64(h.BlockNum) txNumBytes := util.EncodeOrderPreservingVarUint64(h.TxNum) return append(blockNumBytes, txNumBytes...) }