mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04: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