Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranbt committed Dec 31, 2024
1 parent 7216898 commit da40671
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions crates/rbuilder/src/live_builder/block_output/relay_submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,16 @@ async fn run_submit_to_relays_job(
.count();

// Only enable the optimistic config for this block if the bid value is below the max bid value
let optimistic_config =
config
.optimisitic_config
.clone()
.map_or(None, |optimistic_config| {
if block.trace.bid_value < optimistic_config.max_bid_value {
Some(optimistic_config)
} else {
None
}
});
let optimistic_config = config
.optimisitic_config
.clone()
.and_then(|optimistic_config| {
if block.trace.bid_value < optimistic_config.max_bid_value {
Some(optimistic_config)
} else {
None
}
});

let best_bid_value = best_bid_sync_source.best_bid_value().unwrap_or_default();
let submission_span = info_span!(
Expand Down Expand Up @@ -303,7 +302,7 @@ async fn run_submit_to_relays_job(
let can_submit = if optimistic_config.prevalidate_optimistic_blocks {
validate_block(
&slot_data,
&optimistic_signed_submission,
optimistic_signed_submission,
block.sealed_block.clone(),
&config,
cancel.clone(),
Expand Down

0 comments on commit da40671

Please sign in to comment.