Skip to content

Commit 39f9dcb

Browse files
committed
update comments
1 parent eb864bd commit 39f9dcb

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

ledger/complete/wal/checkpoint_node_iterator.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ import (
1616
"github.com/onflow/flow-go/ledger/complete/payloadless"
1717
)
1818

19-
// encLeafHashFlagSize is the size of the V7 leaf-hash presence flag (1 byte).
20-
// The remaining node field sizes are shared with [checkpoint_v7_convert_stream.go]
21-
// (encNodeTypeSize, encHeightSize, encHashSize, encPathSize, encNodeIndexSize,
22-
// encPayloadLengthSize, fixedNodePrefixSize, leafNodeTypeByte, interimNodeTypeByte).
23-
const encLeafHashFlagSize = 1
24-
2519
// ErrCheckpointIntegrity indicates that a checkpoint's trie structure is corrupt:
2620
// either an interim node references a child that has not been seen yet (a forward
2721
// or out-of-range reference, violating the descendants-first ordering), or a node

ledger/complete/wal/checkpoint_v7_convert_stream.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ const (
2828
encNodeIndexSize = 8
2929
encPayloadLengthSize = 4
3030

31+
// encLeafHashFlagSize is the size of the V7 leaf-hash presence flag (1 byte).
32+
// This must match the (unexported) encLeafHashFlagSize in
33+
// ledger/complete/payloadless/flattener.go, which writes this flag.
34+
encLeafHashFlagSize = 1
35+
3136
// fixedNodePrefixSize is the size of the leading bytes shared by every
3237
// encoded node (leaf or interim): node type + height + node hash.
3338
fixedNodePrefixSize = encNodeTypeSize + encHeightSize + encHashSize

0 commit comments

Comments
 (0)