Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
remove trailing semicolons
  • Loading branch information
clabby authored and rkrasiuk committed Jul 23, 2024
1 parent 7529af5 commit b813eba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions crates/rpc/rpc-api/src/debug.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::collections::HashMap;

use jsonrpsee::{core::RpcResult, proc_macros::rpc};
use reth_primitives::{Address, BlockId, BlockNumberOrTag, Bytes, B256};
use reth_rpc_types::{
Expand All @@ -9,6 +7,7 @@ use reth_rpc_types::{
},
Bundle, RichBlock, StateContext, TransactionRequest,
};
use std::collections::HashMap;

/// Debug rpc interface.
#[cfg_attr(not(feature = "client"), rpc(server, namespace = "debug"))]
Expand Down
1 change: 0 additions & 1 deletion crates/rpc/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ reth-evm.workspace = true
reth-rpc-eth-types.workspace = true
reth-rpc-server-types.workspace = true
reth-node-api.workspace = true
reth-trie.workspace = true

# eth
alloy-dyn-abi.workspace = true
Expand Down
26 changes: 10 additions & 16 deletions crates/rpc/rpc/src/debug.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::sync::Arc;

use alloy_rlp::{Decodable, Encodable};
use async_trait::async_trait;
use jsonrpsee::core::RpcResult;
Expand All @@ -10,9 +8,8 @@ use reth_primitives::{
Address, Block, BlockId, BlockNumberOrTag, Bytes, TransactionSignedEcRecovered, B256, U256,
};
use reth_provider::{
BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, HeaderProvider,
HistoricalStateProviderRef, StateProofProvider, StateProvider, StateProviderFactory,
StateRootProvider, TransactionVariant,
BlockReaderIdExt, ChainSpecProvider, EvmEnvProvider, HeaderProvider, StateProofProvider,
StateProviderFactory, TransactionVariant,
};
use reth_revm::database::StateProviderDatabase;
use reth_rpc_api::DebugApiServer;
Expand All @@ -28,16 +25,16 @@ use reth_rpc_types::{
BlockError, Bundle, RichBlock, StateContext, TransactionRequest,
};
use reth_tasks::pool::BlockingTaskGuard;
use reth_trie::{proof::Proof, HashedPostState};
use revm::{
db::{states::bundle_state::BundleRetention, BundleState, CacheDB, State},
db::{BundleState, CacheDB},
primitives::{db::DatabaseCommit, BlockEnv, CfgEnvWithHandlerCfg, Env, EnvWithHandlerCfg},
};
use revm_inspectors::tracing::{
js::{JsInspector, TransactionContext},
FourByteInspector, MuxInspector, TracingInspector, TracingInspectorConfig,
};
use revm_primitives::{keccak256, HashMap};
use std::sync::Arc;
use tokio::sync::{AcquireError, OwnedSemaphorePermit};

/// `debug` API implementation.
Expand Down Expand Up @@ -583,11 +580,8 @@ where
.accounts
.into_iter()
.map(|(addr, db_acc)| {
let storage_keys = db_acc
.storage
.into_iter()
.map(|(storage_key, _)| storage_key.into())
.collect::<Vec<_>>();
let storage_keys =
db_acc.storage.keys().copied().map(Into::into).collect::<Vec<_>>();

let account_proof =
state.proof(&BundleState::default(), addr, &storage_keys)?;
Expand All @@ -607,14 +601,14 @@ where
let mut witness = HashMap::with_capacity(total_nodes);
for proof in account_proofs {
// First, add all account proof nodes.
for node in proof.proof.into_iter() {
for node in proof.proof {
let hash = keccak256(node.as_ref());
witness.insert(hash, node);
}

// Next, add all storage proof nodes.
for storage_proof in proof.storage_proofs.into_iter() {
for node in storage_proof.proof.into_iter() {
for storage_proof in proof.storage_proofs {
for node in storage_proof.proof {
let hash = keccak256(node.as_ref());
witness.insert(hash, node);
}
Expand Down Expand Up @@ -651,7 +645,7 @@ where
GethDebugBuiltInTracerType::FourByteTracer => {
let mut inspector = FourByteInspector::default();
let (res, _) = self.eth_api().inspect(db, env, &mut inspector)?;
return Ok((FourByteFrame::from(inspector).into(), res.state))
return Ok((FourByteFrame::from(inspector).into(), res.state));
}
GethDebugBuiltInTracerType::CallTracer => {
let call_config = tracer_config
Expand Down

0 comments on commit b813eba

Please sign in to comment.