trie: simplify usage of HashedStorage with default (#11662)

This commit is contained in:
Thomas Coratger
2024-10-16 12:31:23 +02:00
committed by GitHub
parent f49a4ae185
commit d421931b7e
2 changed files with 2 additions and 2 deletions

View File

@ -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()
}
}

View File

@ -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);
}