mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(trie): clear all deleted storage nodes on extend (#10411)
This commit is contained in:
@ -152,6 +152,10 @@ impl StorageTrieUpdates {
|
||||
|
||||
/// Extends storage trie updates.
|
||||
pub fn extend(&mut self, other: Self) {
|
||||
if other.is_deleted {
|
||||
self.storage_nodes.clear();
|
||||
self.removed_nodes.clear();
|
||||
}
|
||||
self.is_deleted |= other.is_deleted;
|
||||
self.storage_nodes.extend(ExcludeEmptyFromPair::from_iter(other.storage_nodes));
|
||||
self.removed_nodes.extend(ExcludeEmpty::from_iter(other.removed_nodes));
|
||||
|
||||
Reference in New Issue
Block a user