Skip to content

Commit 4464b1e

Browse files
committed
Clippy expects
1 parent 582f82d commit 4464b1e

File tree

14 files changed

+29
-19
lines changed

14 files changed

+29
-19
lines changed

Diff for: crates/eth-sparse-mpt/src/reth_sparse_trie/hash.rs

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ pub enum RootHashError {
5454
HashingAccountsTrie { err: ErrSparseNodeNotFound },
5555
}
5656

57+
#[expect(clippy::result_large_err)]
5758
impl EthSparseTries {
5859
pub fn calculate_root_hash(
5960
&mut self,
@@ -172,6 +173,7 @@ impl EthSparseTries {
172173
}
173174
}
174175

176+
#[expect(clippy::result_large_err)]
175177
fn hash_storage_trie(
176178
storage_trie: &mut DiffTrie,
177179
account: &Bytes,

Diff for: crates/eth-sparse-mpt/src/reth_sparse_trie/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ impl ChangedAccountData {
7777
}
7878
}
7979

80+
#[expect(clippy::result_large_err)]
8081
/// Prefetches data
8182
pub fn prefetch_tries_for_accounts<'a, Provider>(
8283
consistent_db_view: ConsistentDbView<Provider>,

Diff for: crates/rbuilder/src/building/block_orders/prioritized_order_store.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ use super::{OrderPriority, SimulatedOrderSink};
1616
/// Order must implement BlockOrdersOrder which has priority(). This priority is used to sort the simulated orders.
1717
/// Usage:
1818
/// - Add new order (a little bit complex):
19-
/// ALWAYS BE SURE THAT YOU CALLED update_onchain_nonces and updated the current state of all the needed nonces by the order
20-
/// call insert_order
19+
/// ALWAYS BE SURE THAT YOU CALLED update_onchain_nonces and updated the current state of all the needed nonces by the order
20+
/// call insert_order
2121
/// - Get best order to execute
22-
/// call pop_order to get the best order
23-
/// if the order is executed call update_onchain_nonces to update all the changed nonces.
22+
/// call pop_order to get the best order
23+
/// if the order is executed call update_onchain_nonces to update all the changed nonces.
2424
/// - Remove orders: remove_orders. This is useful if we think this orders are no really good (failed to execute to often)
2525
#[derive(Debug, Clone)]
2626
pub struct PrioritizedOrderStore<OrderPriorityType> {

Diff for: crates/rbuilder/src/building/builders/block_building_helper.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ pub trait BlockBuildingHelper: Send + Sync {
5555
/// This is the maximum profit that can reach the final fee recipient (max bid!).
5656
/// Maximum payout_tx_value value to pass to finalize_block.
5757
/// The main reason to get an error is if profit is so low that we can't pay the payout tx (that would mean negative block value!).
58+
#[expect(clippy::result_large_err)]
5859
fn true_block_value(&self) -> Result<U256, BlockBuildingHelperError>;
5960

6061
/// Eats the BlockBuildingHelper since once it's finished you should not use it anymore.
6162
/// payout_tx_value: If Some, added at the end of the block from coinbase to the final fee recipient.
6263
/// This only works if can_add_payout_tx.
64+
#[expect(clippy::result_large_err)]
6365
fn finalize_block(
6466
self: Box<Self>,
6567
local_ctx: &mut ThreadBlockBuildingContext,
@@ -94,6 +96,7 @@ impl Clone for BiddableUnfinishedBlock {
9496
}
9597

9698
impl BiddableUnfinishedBlock {
99+
#[expect(clippy::result_large_err)]
97100
pub fn new(block: Box<dyn BlockBuildingHelper>) -> Result<Self, BlockBuildingHelperError> {
98101
let true_block_value = block.true_block_value()?;
99102
Ok(Self {
@@ -185,7 +188,7 @@ impl BlockBuildingHelperFromProvider {
185188
/// - Query fee_recipient_balance_start.
186189
/// - pre_block_call.
187190
/// - Estimate payout tx cost.
188-
#[allow(clippy::too_many_arguments)]
191+
#[expect(clippy::result_large_err)]
189192
pub fn new(
190193
state_provider: Arc<dyn StateProvider>,
191194
building_ctx: BlockBuildingContext,
@@ -272,6 +275,7 @@ impl BlockBuildingHelperFromProvider {
272275
}
273276

274277
/// Inserts payout tx if necessary and updates built_block_trace.
278+
#[expect(clippy::result_large_err)]
275279
fn finalize_block_execution(
276280
&mut self,
277281
local_ctx: &mut ThreadBlockBuildingContext,

Diff for: crates/rbuilder/src/building/builders/mock_block_building_helper.rs

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
use crate::building::ThreadBlockBuildingContext;
2-
use crate::live_builder::simulation::SimulatedOrderCommand;
3-
use crate::primitives::SimValue;
4-
use crate::provider::RootHasher;
5-
use crate::roothash::RootHashError;
61
use crate::{
72
building::{
83
BlockBuildingContext, BuiltBlockTrace, CriticalCommitOrderError, ExecutionError,
9-
ExecutionResult,
4+
ExecutionResult, ThreadBlockBuildingContext,
105
},
11-
primitives::SimulatedOrder,
6+
live_builder::simulation::SimulatedOrderCommand,
7+
primitives::{SimValue, SimulatedOrder},
8+
provider::RootHasher,
9+
roothash::RootHashError,
1210
};
13-
use alloy_primitives::B256;
14-
use alloy_primitives::U256;
11+
use alloy_primitives::{B256, U256};
1512
use reth::providers::ExecutionOutcome;
1613
use reth_primitives::SealedBlock;
1714
use time::OffsetDateTime;

Diff for: crates/rbuilder/src/building/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ impl<Tracer: SimulationTracer> PartialBlock<Tracer> {
635635
}
636636

637637
/// returns (requests, withdrawals_root)
638+
#[expect(clippy::result_large_err)]
638639
pub fn process_requests(
639640
&self,
640641
state: &mut BlockState,
@@ -697,7 +698,7 @@ impl<Tracer: SimulationTracer> PartialBlock<Tracer> {
697698
}
698699

699700
/// Mostly based on reth's (v1.2) default_ethereum_payload_builder.
700-
#[allow(clippy::too_many_arguments)]
701+
#[expect(clippy::result_large_err)]
701702
pub fn finalize(
702703
self,
703704
state: &mut BlockState,

Diff for: crates/rbuilder/src/building/sim.rs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::{
2222
};
2323
use tracing::{error, trace};
2424

25+
#[expect(clippy::large_enum_variant)]
2526
#[derive(Debug)]
2627
pub enum OrderSimResult {
2728
Success(SimulatedOrder, Vec<(Address, u64)>),

Diff for: crates/rbuilder/src/live_builder/order_input/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ impl OrderInputConfig {
171171
}
172172

173173
/// Commands we can get from RPC or mempool fetcher.
174+
#[expect(clippy::large_enum_variant)]
174175
#[derive(Debug, Clone)]
175176
pub enum ReplaceableOrderPoolCommand {
176177
/// New or update order

Diff for: crates/rbuilder/src/live_builder/order_input/order_sink.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Drop for OrderPrinter {
4646
}
4747

4848
///////////////////////
49-
49+
#[expect(clippy::large_enum_variant)]
5050
#[derive(Debug, Clone)]
5151
pub enum OrderPoolCommand {
5252
//OrderSink::insert_order

Diff for: crates/rbuilder/src/primitives/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ impl ShareBundleTx {
339339

340340
/// Body element of a mev share bundle.
341341
/// [`ShareBundleInner::body`] is formed by several of these.
342+
#[expect(clippy::large_enum_variant)]
342343
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
343344
pub enum ShareBundleBody {
344345
Tx(ShareBundleTx),

Diff for: crates/rbuilder/src/primitives/order_builder.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use super::{
77
};
88

99
/// Helper object to build Orders for testing.
10+
#[expect(clippy::large_enum_variant)]
1011
#[derive(Debug)]
1112
pub enum OrderBuilder {
1213
MempoolTx(Option<TransactionSignedEcRecoveredWithBlobs>),

Diff for: crates/rbuilder/src/provider/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ pub trait RootHasher: std::fmt::Debug + Send + Sync {
4848
cancel: CancellationToken,
4949
);
5050

51+
#[expect(clippy::result_large_err)]
5152
/// State root for changes outcome on top of parent block.
5253
fn state_root(&self, outcome: &ExecutionOutcome) -> Result<B256, RootHashError>;
5354
}

Diff for: crates/rbuilder/src/roothash/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ where
109109
parallel_root_calculator.incremental_root()
110110
}
111111

112-
#[allow(clippy::too_many_arguments)]
112+
#[expect(clippy::result_large_err)]
113113
pub fn calculate_state_root<P, HasherType>(
114114
provider: P,
115115
hasher: &HasherType,

Diff for: crates/rbuilder/src/telemetry/servers/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//! Telemetry contains two servers.
22
//!
33
//! - [full]: verbose server exposing detailed operational information about the
4-
//! builder.
4+
//! builder.
55
//! - [redacted]: deliberately redacted server serves information suitable for
6-
//! tdx builders to expose in real-time.
6+
//! tdx builders to expose in real-time.
77
//!
88
//! The redacted server is seperate from the debug server because it may be desirable
99
//! to expose debug and redacted data differently in tdx builders. e.g. redacted data

0 commit comments

Comments
 (0)