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

Commit 63c5ea0

Browse files
committed
replace isBranch in stackTrie
1 parent a5b0b2e commit 63c5ea0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

geth-utils/gethutil/mpt/witness/prepare_witness.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ func GenerateWitness(txIdx uint, key, value []byte, proof *trie.StackProof) []No
477477
if mismatchedIdx == -1 {
478478
// Add a tx leaf after branch placeholder
479479
if lastProofTypeS == trie.LeafNode {
480-
leafNode = prepareTxLeafNode(txIdx, proofS[len1-1], proofC[len2-1], k, nil, isBranch(proofS[len1-1]), false, false)
480+
leafNode = prepareTxLeafNode(txIdx, proofS[len1-1], proofC[len2-1], k, nil, proofTypeS[len1-1] != trie.BranchNode, false, false)
481481
} else {
482482
leafNode = prepareTxLeafAndPlaceholderNode(txIdx, proofC[len2-1], k, false)
483483
}

0 commit comments

Comments
 (0)