Skip to content

Commit

Permalink
fix: +2 offset in no-gap encoding
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Ballet <[email protected]>
  • Loading branch information
gballet committed Sep 16, 2024
1 parent a41ce08 commit 12343ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func parseSkipList(serialized []byte, depth byte) (VerkleNode, error) {

// shortcut: the leaf is full and so both values are 0.
if serialized[offset] == 0 && serialized[offset+1] == 0 {
offset += 2 // skip single header
for i := 0; i < 256; i++ {
values[i] = serialized[offset : offset+leafSlotSize]
offset += leafSlotSize
Expand Down

0 comments on commit 12343ee

Please sign in to comment.