feat: move StateRootProvider to StateProvider trait (#2392)

This commit is contained in:
Matthias Seitz
2023-04-25 19:52:46 +02:00
committed by GitHub
parent ccdaa74e41
commit 420a65a206
12 changed files with 77 additions and 47 deletions

View File

@ -600,7 +600,9 @@ mod tests {
constants::ETH_TO_WEI, hex_literal::hex, keccak256, Account, Address, BlockNumber,
Bytecode, Bytes, ChainSpecBuilder, ForkCondition, StorageKey, H256, MAINNET, U256,
};
use reth_provider::{post_state::Storage, AccountProvider, BlockHashProvider, StateProvider};
use reth_provider::{
post_state::Storage, AccountProvider, BlockHashProvider, StateProvider, StateRootProvider,
};
use reth_rlp::Decodable;
use std::{collections::HashMap, str::FromStr};
@ -655,6 +657,12 @@ mod tests {
}
}
impl StateRootProvider for StateProviderTest {
fn state_root(&self, _post_state: PostState) -> reth_interfaces::Result<H256> {
todo!()
}
}
impl StateProvider for StateProviderTest {
fn storage(
&self,