diff --git a/packages/validator/src/util/clock.ts b/packages/validator/src/util/clock.ts index 837fb82809bd..ca29eacd41c2 100644 --- a/packages/validator/src/util/clock.ts +++ b/packages/validator/src/util/clock.ts @@ -138,7 +138,7 @@ export class Clock implements IClock { */ export function getCurrentSlotAround(config: ChainForkConfig, genesisTime: TimeSeconds): Slot { const diffInSeconds = Date.now() / 1000 - genesisTime; - const slotsSinceGenesis = Math.floor(diffInSeconds / config.SECONDS_PER_SLOT); + const slotsSinceGenesis = Math.round(diffInSeconds / config.SECONDS_PER_SLOT); return GENESIS_SLOT + slotsSinceGenesis; }