From 63a6856ccdd25d0184a756f9a67d1bd3c693bc0d Mon Sep 17 00:00:00 2001 From: y Date: Mon, 18 Sep 2023 11:33:36 -0400 Subject: [PATCH] timekeeper: restore 0 check for `slot` --- src/util/time.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/time.rs b/src/util/time.rs index efb816c0d..fc0cbbace 100644 --- a/src/util/time.rs +++ b/src/util/time.rs @@ -78,6 +78,9 @@ impl TimeKeeper { /// epoch 1 has one less slot(the genesis slot) and /// rest epoch have the normal amount of slots. pub fn slot_epoch(&self, slot: u64) -> u64 { + if slot == 0 { + return 0 + } (slot / self.epoch_length) + 1 }