Skip to content

Commit

Permalink
log branch node
Browse files Browse the repository at this point in the history
  • Loading branch information
bendanzhentan committed Jan 15, 2024
1 parent 4a2f80a commit c0d8eee
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions trie/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,19 @@ func (t *Trie) Prove(key []byte, fromLevel uint, proofDb ethdb.KeyValueWriter) e
}
nodes = append(nodes, n)
case *fullNode:
tn = n.Children[key[0]]
prefix = append(prefix, key[0])
key = key[1:]
nodes = append(nodes, n)
log.Info("bilibili loop", "marker", hexutils.BytesToHex(marker), "index", i, "type", "FULL NODE")
if len(key) == 0 {
nodes = append(nodes, n)
tn = nil
log.Info("bilibili loop", "marker", hexutils.BytesToHex(marker), "index", i, "type", "FULL NODE", "key1", len(key))
} else {

tn = n.Children[key[0]]
prefix = append(prefix, key[0])
key = key[1:]
nodes = append(nodes, n)
log.Info("bilibili loop", "marker", hexutils.BytesToHex(marker), "index", i, "type", "FULL NODE", "key", len(key))
}

case hashNode:
log.Info("bilibili loop", "marker", hexutils.BytesToHex(marker), "index", i, "type", "HASH NODE")
// Retrieve the specified node from the underlying node reader.
Expand Down

0 comments on commit c0d8eee

Please sign in to comment.