core/state, trie: port changes from PBSS (#26763)
This commit is contained in:
+4
-5
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user