Skip to content

Commit f4fd514

Browse files
authored
little fix (#24)
1 parent f088fdf commit f4fd514

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/limits.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ impl FlashblockLimits {
9090

9191
let (target_flashblock, first_flashblock_interval) =
9292
self.calculate_flashblocks(payload, remaining_time);
93-
state.gas_per_flashblock = enclosing.gas_limit / target_flashblock;
93+
94+
state.gas_per_flashblock = enclosing
95+
.gas_limit
96+
.checked_div(target_flashblock)
97+
.unwrap_or(enclosing.gas_limit);
9498
state.current_block = Some(payload.block().number());
9599
state.current_flashblock = 0;
96100
state.first_flashblock_interval = first_flashblock_interval;

src/publish.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl Step<Flashblocks> for PublishFlashblock {
100100
if self.flashblock_number.load(Ordering::Relaxed)
101101
>= self.max_flashblocks.load(Ordering::Relaxed)
102102
{
103-
tracing::warn!("Stopping flashblocks production");
103+
tracing::trace!("Stopping flashblocks production");
104104
// We have reached maximum number of flashblocks, stop sending them
105105
return ControlFlow::Break(payload);
106106
}

0 commit comments

Comments
 (0)