mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
trie: simplify usage of HashedStorage with default (#11662)
This commit is contained in:
@ -43,7 +43,7 @@ impl<SP: StateProvider, EDP: ExecutionDataProvider> BundleStateProvider<SP, EDP>
|
||||
account.storage.iter().map(|(slot, value)| (slot, &value.present_value)),
|
||||
)
|
||||
})
|
||||
.unwrap_or_else(|| HashedStorage::new(false))
|
||||
.unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -320,7 +320,7 @@ mod tests {
|
||||
hashed_state
|
||||
.storages
|
||||
.entry(hashed_address)
|
||||
.or_insert_with(|| HashedStorage::new(false))
|
||||
.or_insert_with(HashedStorage::default)
|
||||
.storage
|
||||
.insert(hashed_slot, *value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user