Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/op-rbuilder/src/revert_protection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ where
} else {
// If no upper bound is set, use the maximum block range
bundle.block_number_max = Some(last_block_number + MAX_BLOCK_RANGE_BLOCKS);
// Ensure that the new max is not smaller than the min
if let Some(block_number_min) = bundle.block_number_min {
if block_number_min > bundle.block_number_max.unwrap() {
return Err(
EthApiError::InvalidParams("block_number_min is too high".into()).into(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be helpful to return the block_number_min and block_number_max in the error message

);
}
}
}

let recovered = recover_raw_transaction(&bundle_transaction)?;
Expand Down
Loading