From cde4740f14e784ea35059acfeacb27b8d94e0e98 Mon Sep 17 00:00:00 2001 From: Luca Provini Date: Mon, 13 Nov 2023 13:11:12 +0100 Subject: [PATCH] feat: changesetreader for mockethprovider --- crates/storage/provider/src/test_utils/mock.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/storage/provider/src/test_utils/mock.rs b/crates/storage/provider/src/test_utils/mock.rs index 76d958c872ff..08be82c3bddb 100644 --- a/crates/storage/provider/src/test_utils/mock.rs +++ b/crates/storage/provider/src/test_utils/mock.rs @@ -2,12 +2,12 @@ use crate::{ bundle_state::BundleStateWithReceipts, traits::{BlockSource, ReceiptProvider}, AccountReader, BlockHashReader, BlockIdReader, BlockNumReader, BlockReader, BlockReaderIdExt, - BundleStateDataProvider, ChainSpecProvider, EvmEnvProvider, HeaderProvider, + BundleStateDataProvider, ChainSpecProvider, ChangeSetReader, EvmEnvProvider, HeaderProvider, ReceiptProviderIdExt, StateProvider, StateProviderBox, StateProviderFactory, StateRootProvider, TransactionVariant, TransactionsProvider, WithdrawalsProvider, }; use parking_lot::Mutex; -use reth_db::models::StoredBlockBodyIndices; +use reth_db::models::{AccountBeforeTx, StoredBlockBodyIndices}; use reth_interfaces::{provider::ProviderError, RethResult}; use reth_primitives::{ keccak256, trie::AccountProof, Account, Address, Block, BlockHash, BlockHashOrNumber, BlockId, @@ -638,3 +638,12 @@ impl WithdrawalsProvider for MockEthProvider { unimplemented!() } } + +impl ChangeSetReader for MockEthProvider { + fn account_block_changeset( + &self, + _block_number: BlockNumber, + ) -> RethResult> { + Ok(Vec::default()) + } +}