Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 2853a88

Browse files
committed
clippy
1 parent 96da5d5 commit 2853a88

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

crates/op-rbuilder/src/block_stm/db_adapter.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,11 @@ where
234234
// Check cache first
235235
{
236236
let cache = self.account_cache.lock().unwrap();
237-
if let Some(cached) = cache.get(&address) {
238-
if cached.info.is_some() {
239-
return Ok(cached.info.clone());
240-
}
237+
if let Some(CachedAccount {
238+
info: Some(info), ..
239+
}) = cache.get(&address)
240+
{
241+
return Ok(Some(info.clone()));
241242
}
242243
}
243244

crates/op-rbuilder/src/block_stm/scheduler.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ impl Scheduler {
200200
}
201201

202202
/// Record execution completion for a transaction.
203+
#[expect(clippy::too_many_arguments)]
203204
pub fn finish_execution(
204205
&self,
205206
txn_idx: TxnIndex,

crates/op-rbuilder/src/block_stm/view.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ impl WriteSet {
189189
}
190190

191191
/// Consume the write set and return both regular writes and balance deltas.
192+
#[expect(clippy::type_complexity)]
192193
pub fn into_parts(self) -> (Vec<(EvmStateKey, EvmStateValue)>, Vec<(Address, U256)>) {
193194
(self.writes, self.balance_deltas)
194195
}

crates/op-rbuilder/src/builders/context.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl<ExtraCtx: Debug + Default, EF> OpPayloadBuilderCtx<ExtraCtx, EF> {
103103
Self { cancel, ..self }
104104
}
105105

106-
pub(super) fn to_lazy_evm(self) -> OpPayloadBuilderCtx<ExtraCtx, OpLazyEvmFactory> {
106+
pub(super) fn into_lazy_evm(self) -> OpPayloadBuilderCtx<ExtraCtx, OpLazyEvmFactory> {
107107
let OpPayloadBuilderCtx {
108108
evm_config,
109109
da_config,
@@ -908,13 +908,13 @@ impl<ExtraCtx: Debug + Default> OpPayloadBuilderCtx<ExtraCtx, OpLazyEvmFactory>
908908
let exec_result = match exec_result {
909909
Ok(res) => res,
910910
Err(err) => {
911-
if let Some(err) = err.as_invalid_tx_err() {
912-
if !err.is_nonce_too_low() {
913-
shared_best_txs
914-
.lock()
915-
.unwrap()
916-
.mark_invalid(tx.signer(), tx.nonce());
917-
}
911+
if let Some(err) = err.as_invalid_tx_err()
912+
&& !err.is_nonce_too_low()
913+
{
914+
shared_best_txs
915+
.lock()
916+
.unwrap()
917+
.mark_invalid(tx.signer(), tx.nonce());
918918
}
919919
// Get captured reads even on failure
920920
let captured_reads =
@@ -991,6 +991,7 @@ impl<ExtraCtx: Debug + Default> OpPayloadBuilderCtx<ExtraCtx, OpLazyEvmFactory>
991991

992992
// Add writes only for values that actually changed
993993
for (addr, account) in state.iter() {
994+
debug!("Account touched: {}", addr);
994995
if account.is_touched() {
995996
// Get original values from captured reads (if available)
996997
let original_balance = captured_reads.get_balance(*addr);

crates/op-rbuilder/src/builders/flashblocks/payload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ where
691691

692692
// Use parallel execution only when parallel_threads > 1
693693
if ctx.parallel_threads > 1 {
694-
let ctx = ctx.clone().to_lazy_evm();
694+
let ctx = ctx.clone().into_lazy_evm();
695695
ctx.execute_best_transactions_parallel(
696696
info,
697697
state,

crates/op-rbuilder/src/builders/standard/payload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ impl<Txs: PayloadTxsBounds + Send> OpBuilder<'_, Txs> {
420420
.transaction_pool_fetch_gauge
421421
.set(transaction_pool_fetch_time);
422422

423-
let ctx = ctx.clone().to_lazy_evm();
423+
let ctx = ctx.clone().into_lazy_evm();
424424
if ctx
425425
.execute_best_transactions_parallel(
426426
&mut info,

0 commit comments

Comments
 (0)