Skip to content

Commit

Permalink
chore: remove type aliases (#8155)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored May 8, 2024
1 parent 18b7edb commit bdb8238
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions crates/revm/src/database.rs
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/rpc/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bdb8238

Please sign in to comment.