diff --git a/src/node/consensus.rs b/src/node/consensus.rs index 824ed3309..6a467af69 100644 --- a/src/node/consensus.rs +++ b/src/node/consensus.rs @@ -186,9 +186,7 @@ where // See more about EIP here: https://eips.ethereum.org/EIPS/eip-658 if chain_spec.is_byzantium_active_at_block(block.header().number()) { let receipts_for_root = receipts - .iter() - .cloned() - .filter(|r| r.cumulative_gas_used() != 0) + .iter().filter(|&r| r.cumulative_gas_used() != 0).cloned() .collect::>(); if let Err(error) = verify_receipts( block.header().receipts_root(), diff --git a/src/node/evm/assembler.rs b/src/node/evm/assembler.rs index a78658a68..68fa922b9 100644 --- a/src/node/evm/assembler.rs +++ b/src/node/evm/assembler.rs @@ -1,8 +1,8 @@ use crate::{ node::evm::config::{HlBlockExecutorFactory, HlEvmConfig}, - HlBlock, HlBlockBody, + HlBlock, }; -use alloy_consensus::{Block, Header}; +use alloy_consensus::Header; use reth_evm::{ block::BlockExecutionError, execute::{BlockAssembler, BlockAssemblerInput}, diff --git a/src/node/evm/executor.rs b/src/node/evm/executor.rs index 20b9cd7b3..df0ca0ea8 100644 --- a/src/node/evm/executor.rs +++ b/src/node/evm/executor.rs @@ -69,7 +69,7 @@ fn run_precompile( return Err(PrecompileError::OutOfGas); }; - return match *get { + match *get { ReadPrecompileResult::Ok { gas_used, ref bytes, @@ -87,7 +87,7 @@ fn run_precompile( Err(PrecompileError::OutOfGas) } ReadPrecompileResult::UnexpectedError => panic!("unexpected precompile error"), - }; + } } impl<'a, DB, EVM, Spec, R: ReceiptBuilder> HlBlockExecutor<'a, EVM, Spec, R> diff --git a/src/node/network/mod.rs b/src/node/network/mod.rs index ea3d3c3cc..ca0e18964 100644 --- a/src/node/network/mod.rs +++ b/src/node/network/mod.rs @@ -18,13 +18,13 @@ use reth::{ builder::{components::NetworkBuilder, BuilderContext}, transaction_pool::{PoolTransaction, TransactionPool}, }; -use reth_discv4::{Discv4Config, NodeRecord}; +use reth_discv4::NodeRecord; use reth_engine_primitives::BeaconConsensusEngineHandle; use reth_eth_wire::{BasicNetworkPrimitives, NewBlock, NewBlockPayload}; use reth_ethereum_primitives::PooledTransactionVariant; use reth_network::{NetworkConfig, NetworkHandle, NetworkManager}; use reth_network_api::PeersInfo; -use std::{sync::Arc, time::Duration}; +use std::sync::Arc; use tokio::sync::{mpsc, oneshot, Mutex}; use tracing::info; diff --git a/src/node/types/reth_compat.rs b/src/node/types/reth_compat.rs index cad5250bb..01e0d3a37 100644 --- a/src/node/types/reth_compat.rs +++ b/src/node/types/reth_compat.rs @@ -1,12 +1,11 @@ //! Copy of reth codebase to preserve serialization compatibility use alloy_consensus::{ - Header, Signed, TxEip1559, TxEip2930, TxEip4844, TxEip7702, TxLegacy, TypedTransaction, + Header, Signed, TxEip1559, TxEip2930, TxEip4844, TxEip7702, TxLegacy, }; use alloy_primitives::{Address, BlockHash, Signature, TxKind, U256}; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; use std::sync::{Arc, LazyLock, Mutex}; -use tokio::runtime::Handle; use tracing::info; use crate::node::spot_meta::{erc20_contract_to_spot_token, SpotId}; @@ -139,10 +138,10 @@ impl SealedBlock { sidecars: None, read_precompile_calls: Some(read_precompile_calls), }; - let reth_block = HlBlock { + + HlBlock { header: self.header.header.clone(), body: block_body, - }; - reth_block.into() + } } }