Skip to content

Commit 9d896af

Browse files
removed float arithmatic and changed to integer
1 parent 020d82b commit 9d896af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

beacon_node/beacon_processor/src/scheduler/work_reprocessing_queue.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub const BACKFILL_SCHEDULE_IN_SLOT: [(u32, u32); 3] = [
8686

8787
/// Fraction of slot duration after which column reconstruction is triggered, makes it easier for
8888
/// different slot timings to have a generalised deadline
89-
pub const RECONSTRUCTION_DEADLINE: f64 = 0.25;
89+
pub const RECONSTRUCTION_DEADLINE: (u64, u64) = (1, 4);
9090

9191
/// Messages that the scheduler can receive.
9292
#[derive(AsRefStr)]
@@ -757,9 +757,9 @@ impl<S: SlotClock> ReprocessQueue<S> {
757757
}
758758
InboundEvent::Msg(DelayColumnReconstruction(request)) => {
759759
let mut reconstruction_delay = QUEUED_RECONSTRUCTION_DELAY;
760-
let slot_duration = self.slot_clock.slot_duration().as_millis() as f64;
760+
let slot_duration = self.slot_clock.slot_duration().as_millis() as u64;
761761
let reconstruction_deadline_millis =
762-
(slot_duration * RECONSTRUCTION_DEADLINE).floor() as u64;
762+
(slot_duration * RECONSTRUCTION_DEADLINE.0) / RECONSTRUCTION_DEADLINE.1;
763763
let reconstruction_deadline = Duration::from_millis(reconstruction_deadline_millis);
764764
if let Some(seconds_from_current_slot) =
765765
self.slot_clock.seconds_from_current_slot_start()

0 commit comments

Comments
 (0)