@@ -6,7 +6,9 @@ use alloy_primitives::{
66 Address , BlockNumber , Bytes , B256 ,
77} ;
88use reth_primitives:: { Account , Bytecode } ;
9- use reth_storage_api:: { HashedPostStateProvider , StateProofProvider , StorageRootProvider } ;
9+ use reth_storage_api:: {
10+ HashedPostStateProvider , HashedStorageProvider , StateProofProvider , StorageRootProvider ,
11+ } ;
1012use reth_storage_errors:: provider:: ProviderResult ;
1113use reth_trie:: {
1214 updates:: TrieUpdates , AccountProof , HashedPostState , HashedStorage , MultiProof , TrieInput ,
@@ -37,12 +39,7 @@ impl<SP: StateProvider, EDP: ExecutionDataProvider> BundleStateProvider<SP, EDP>
3739 let bundle_state = self . block_execution_data_provider . execution_outcome ( ) . state ( ) ;
3840 bundle_state
3941 . account ( & address)
40- . map ( |account| {
41- HashedStorage :: from_plain_storage (
42- account. status ,
43- account. storage . iter ( ) . map ( |( slot, value) | ( slot, & value. present_value ) ) ,
44- )
45- } )
42+ . map ( |account| self . state_provider . hashed_storage_from_bundle_account ( account) )
4643 . unwrap_or_default ( )
4744 }
4845}
@@ -193,6 +190,17 @@ impl<SP: StateProvider, EDP: ExecutionDataProvider> HashedPostStateProvider
193190 }
194191}
195192
193+ impl < SP : StateProvider , EDP : ExecutionDataProvider > HashedStorageProvider
194+ for BundleStateProvider < SP , EDP >
195+ {
196+ fn hashed_storage_from_bundle_account (
197+ & self ,
198+ account : & reth_execution_types:: BundleAccount ,
199+ ) -> HashedStorage {
200+ self . state_provider . hashed_storage_from_bundle_account ( account)
201+ }
202+ }
203+
196204impl < SP : StateProvider , EDP : ExecutionDataProvider > StateProvider for BundleStateProvider < SP , EDP > {
197205 fn storage (
198206 & self ,
0 commit comments