chore: remove type aliases (#8155)

This commit is contained in:
Matthias Seitz
2024-05-08 15:45:47 +02:00
committed by GitHub
parent 18b7edb191
commit bdb8238d79
2 changed files with 4 additions and 11 deletions

View File

@ -1,19 +1,12 @@
use reth_interfaces::RethError;
use reth_primitives::{Address, B256, KECCAK_EMPTY, U256};
use reth_provider::{ProviderError, StateProvider};
use revm::{
db::{CacheDB, DatabaseRef},
db::DatabaseRef,
primitives::{AccountInfo, Bytecode},
Database, StateDBBox,
Database,
};
use std::ops::{Deref, DerefMut};
/// SubState of database. Uses revm internal cache with binding to reth StateProvider trait.
pub type SubState<DB> = CacheDB<StateProviderDatabase<DB>>;
/// State boxed database with reth Error.
pub type RethStateDBBox<'a> = StateDBBox<'a, RethError>;
/// Wrapper around StateProvider that implements revm database trait
#[derive(Debug, Clone)]
pub struct StateProviderDatabase<DB>(pub DB);

View File

@ -17,7 +17,7 @@ use reth_primitives::{
use reth_provider::{
BlockReaderIdExt, ChainSpecProvider, HeaderProvider, StateProviderBox, TransactionVariant,
};
use reth_revm::database::{StateProviderDatabase, SubState};
use reth_revm::database::StateProviderDatabase;
use reth_rpc_api::DebugApiServer;
use reth_rpc_types::{
trace::geth::{
@ -517,7 +517,7 @@ where
&self,
opts: GethDebugTracingOptions,
env: EnvWithHandlerCfg,
db: &mut SubState<StateProviderBox>,
db: &mut CacheDB<StateProviderDatabase<StateProviderBox>>,
transaction_context: Option<TransactionContext>,
) -> EthResult<(GethTrace, revm_primitives::State)> {
let GethDebugTracingOptions { config, tracer, tracer_config, .. } = opts;