Skip to content

Commit

Permalink
fix: add description
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco4203 committed Sep 26, 2024
1 parent defda57 commit 8fc5346
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion trie/committer.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (c *committer) store(path []byte, n node) node {
// deleted only if the node was existent in database before.
prev, ok := c.tracer.accessList[string(path)]
if ok {
c.nodes.addNode([]byte(path), &nodeWithPrev{&memoryNode{}, prev})
c.nodes.addNode(path, &nodeWithPrev{&memoryNode{}, prev})
}
return n
}
Expand Down
1 change: 1 addition & 0 deletions trie/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ func forHashedNodes(tr *Trie) map[string][]byte {
return nodes
}

// diffTries return the diff and shared nodes between 2 tries
func diffTries(trieA, trieB *Trie) (map[string][]byte, map[string][]byte, map[string][]byte) {
var (
nodesA = forHashedNodes(trieA)
Expand Down
1 change: 1 addition & 0 deletions trie/trie_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ func (randTest) Generate(r *rand.Rand, size int) reflect.Value {
return reflect.ValueOf(steps)
}

// verifyAccessList verifies the access list of the new trie against the old trie.
func verifyAccessList(old *Trie, new *Trie, set *NodeSet) error {
deletes, inserts, updates := diffTries(old, new)

Expand Down

0 comments on commit 8fc5346

Please sign in to comment.