chore: clippy

This commit is contained in:
sprites0
2025-06-24 02:04:14 +00:00
parent 225f9b0948
commit 2152e2406d
5 changed files with 11 additions and 14 deletions

View File

@ -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::<Vec<_>>();
if let Err(error) = verify_receipts(
block.header().receipts_root(),

View File

@ -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},

View File

@ -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>

View File

@ -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;

View File

@ -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()
}
}
}