Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Comment added
Browse files Browse the repository at this point in the history
  • Loading branch information
miha-stopar committed Feb 26, 2024
1 parent f3f15b9 commit 16d93ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions geth-utils/gethutil/mpt/trie/stacktrie.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,8 @@ func (st *StackTrie) GetProof(db ethdb.KeyValueReader, key []byte) ([][]byte, er
proof = append(proof, c_rlp)
branchChild := st.getNodeFromBranchRLP(c_rlp, k[i])

// branchChild is of length 1 when there is no child at this position in the branch
// (`branchChild = [128]` in this case), but it is also of length 1 when `c_rlp` is a leaf.
if len(branchChild) == 1 {
// no child at this position - 128 is RLP encoding for nil object
break
Expand Down

0 comments on commit 16d93ad

Please sign in to comment.