Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bendanzhentan committed Jan 17, 2024
1 parent afd13a0 commit 402b2c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions trie/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ func (t *Trie) Prove(key []byte, fromLevel uint, proofDb ethdb.KeyValueWriter) e
}

nodeType := "nil"
switch n.(type) {
var nodeVal node
switch nnn := n.(type) {
case *shortNode:
nodeType = "shortNode"
case *fullNode:
nodeType = "fullNode"
nodeVal = nnn.Children[16]
case hashNode:
nodeType = "hashNode"
case valueNode:
Expand All @@ -114,10 +116,10 @@ func (t *Trie) Prove(key []byte, fromLevel uint, proofDb ethdb.KeyValueWriter) e
}
proofDb.Put(hash, enc)
putted++
log.Info("bilibili proofDb.Put", "marker", marker, "i", i, "node", nodeType, "ok", ok)
log.Info("bilibili proofDb.Put", "marker", marker, "i", i, "nodeType", nodeType, "nodeVal", nodeVal, "ok", ok)
} else {
discard++
log.Info("bilibili proofDb.Discard", "marker", marker, "i", i, "node", nodeType, "ok", ok)
log.Info("bilibili proofDb.Discard", "marker", marker, "i", i, "nodeType", nodeType, "nodeVal", nodeVal, "ok", ok)
}
}
log.Info("bilibili finish", "marker", marker, "putted", putted, "discard", discard)
Expand Down

0 comments on commit 402b2c5

Please sign in to comment.