Skip to content

Commit be239fe

Browse files
committed
review fixes
1 parent 6b84631 commit be239fe

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

crates/engine/tree/src/tree/payload_processor/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,10 @@ where
349349
let _ = execute_tx.send(tx);
350350
next_for_execution += 1;
351351

352-
while queue.first_key_value().is_some_and(|(idx, _)| *idx == next_for_execution)
352+
while let Some(entry) = queue.first_entry() &&
353+
*entry.key() == next_for_execution
353354
{
354-
let _ = execute_tx.send(queue.pop_first().unwrap().1);
355+
let _ = execute_tx.send(entry.remove());
355356
next_for_execution += 1;
356357
}
357358
} else {

crates/engine/tree/src/tree/payload_validator.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,8 @@ where
226226
convert(tx).map(Either::Left).map_err(Either::Left)
227227
};
228228

229-
Ok((
230-
iter,
231-
Box::new(convert)
232-
as Box<
233-
dyn Fn(Either<_, _>) -> Result<Either<_, _>, _> + Send + Sync + 'static,
234-
>,
235-
))
229+
// Box the closure to satisfy the `Fn` bound both here and in the branch below
230+
Ok((iter, Box::new(convert) as Box<dyn Fn(_) -> _ + Send + Sync + 'static>))
236231
}
237232
BlockOrPayload::Block(block) => {
238233
let iter =

crates/evm/evm/src/engine.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ pub trait ConfigureEngineEvm<ExecutionData>: ConfigureEvm {
2323
/// parallelize heavy work like decoding or recovery.
2424
pub trait ExecutableTxTuple: Into<(Self::Iter, Self::Convert)> + Send + 'static {
2525
/// Raw transaction that can be converted to an [`ExecutableTxIterator::Tx`]
26+
///
27+
/// This can be any type that can be converted to an [`ExecutableTxIterator::Tx`]. For example,
28+
/// an unrecovered transaction or just the transaction bytes.
2629
type RawTx: Send + Sync + 'static;
2730
/// The executable transaction type iterator yields.
2831
type Tx: Clone + Send + Sync + 'static;

0 commit comments

Comments
 (0)