core/state, trie: port changes from PBSS (#26763)

This commit is contained in:
rjl493456442
2023-03-14 04:50:53 -04:00
committed by GitHub
parent 94ff721911
commit c8a6b7100c
11 changed files with 646 additions and 646 deletions
+4 -5
View File
@@ -792,13 +792,12 @@ func (db *Database) Update(nodes *MergedNodeSet) error {
}
for _, owner := range order {
subset := nodes.sets[owner]
for _, path := range subset.updates.order {
n, ok := subset.updates.nodes[path]
if !ok {
return fmt.Errorf("missing node %x %v", owner, path)
subset.forEachWithOrder(func(path string, n *memoryNode) {
if n.isDeleted() {
return // ignore deletion
}
db.insert(n.hash, int(n.size), n.node)
}
})
}
// Link up the account trie and storage trie if the node points
// to an account trie leaf.