From 450282cb76b3455995618e26566bb830b449d5f0 Mon Sep 17 00:00:00 2001 From: Plamen Hristov Date: Mon, 9 Oct 2023 23:37:43 +0300 Subject: [PATCH] Added trivial implementation of MockEthProvider for completeness. (#4960) --- .../storage/provider/src/test_utils/mock.rs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/crates/storage/provider/src/test_utils/mock.rs b/crates/storage/provider/src/test_utils/mock.rs index 4ee0ccc56..3c44f1aa0 100644 --- a/crates/storage/provider/src/test_utils/mock.rs +++ b/crates/storage/provider/src/test_utils/mock.rs @@ -566,30 +566,30 @@ impl StateProviderFactory for MockEthProvider { } fn history_by_block_number(&self, _block: BlockNumber) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } fn history_by_block_hash(&self, _block: BlockHash) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } fn state_by_block_hash(&self, _block: BlockHash) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } fn pending(&self) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } fn pending_state_by_hash(&self, _block_hash: B256) -> RethResult>> { - todo!() + Ok(Some(Box::new(self.clone()))) } fn pending_with_provider<'a>( &'a self, _post_state_data: Box, ) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } } @@ -599,30 +599,30 @@ impl StateProviderFactory for Arc { } fn history_by_block_number(&self, _block: BlockNumber) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } fn history_by_block_hash(&self, _block: BlockHash) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } fn state_by_block_hash(&self, _block: BlockHash) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } fn pending(&self) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } fn pending_state_by_hash(&self, _block_hash: B256) -> RethResult>> { - todo!() + Ok(Some(Box::new(self.clone()))) } fn pending_with_provider<'a>( &'a self, _post_state_data: Box, ) -> RethResult> { - todo!() + Ok(Box::new(self.clone())) } }