Skip to content

Commit

Permalink
trie/trienode: remove unnecessary check in Summary (ethereum#30047)
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp authored Jun 25, 2024
1 parent 98b5930 commit 9298d2d
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions trie/trienode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,14 @@ func (set *NodeSet) Size() (int, int) {
func (set *NodeSet) Summary() string {
var out = new(strings.Builder)
fmt.Fprintf(out, "nodeset owner: %v\n", set.Owner)
if set.Nodes != nil {
for path, n := range set.Nodes {
// Deletion
if n.IsDeleted() {
fmt.Fprintf(out, " [-]: %x\n", path)
continue
}
// Insertion or update
fmt.Fprintf(out, " [+/*]: %x -> %v \n", path, n.Hash)
for path, n := range set.Nodes {
// Deletion
if n.IsDeleted() {
fmt.Fprintf(out, " [-]: %x\n", path)
continue
}
// Insertion or update
fmt.Fprintf(out, " [+/*]: %x -> %v \n", path, n.Hash)
}
for _, n := range set.Leaves {
fmt.Fprintf(out, "[leaf]: %v\n", n)
Expand Down

0 comments on commit 9298d2d

Please sign in to comment.