changed slot_length to u32

This commit is contained in:
alessandrokonrad
2022-10-16 20:32:24 -04:00
committed by Lucas
parent 28b9fed8e5
commit a14dae5863
4 changed files with 4 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ use super::{
};
fn slot_to_begin_posix_time(slot: u64, sc: &SlotConfig) -> u64 {
let ms_after_begin = (slot - sc.zero_slot) * sc.slot_length;
let ms_after_begin = (slot - sc.zero_slot) * sc.slot_length as u64;
sc.zero_time + ms_after_begin
}

View File

@@ -83,7 +83,7 @@ pub struct TimeRange {
}
pub struct SlotConfig {
pub slot_length: u64,
pub slot_length: u32,
pub zero_slot: u64,
pub zero_time: u64,
}