diff --git a/beacon_chain/beacon_clock.nim b/beacon_chain/beacon_clock.nim index a914174c4..fda3d3d09 100644 --- a/beacon_chain/beacon_clock.nim +++ b/beacon_chain/beacon_clock.nim @@ -16,6 +16,10 @@ from times import Time, getTime, fromUnix, `<`, `-`, inNanoseconds export chronos.Duration, Moment, now +const + NANOSECONDS_PER_SLOT* = SECONDS_PER_SLOT * 1_000_000_000'u64 + NANOSECONDS_PER_EPOCH* = NANOSECONDS_PER_SLOT * SLOTS_PER_EPOCH + type BeaconClock* = object ## The beacon clock represents time as it passes on a beacon chain. Beacon diff --git a/beacon_chain/validator_client/common.nim b/beacon_chain/validator_client/common.nim index d90b2c4be..744736ffc 100644 --- a/beacon_chain/validator_client/common.nim +++ b/beacon_chain/validator_client/common.nim @@ -936,6 +936,7 @@ proc checkedWaitForSlot*(vc: ValidatorClientRef, destinationSlot: Slot, start_slot = shortLog(currentSlot) dest_slot = shortLog(destinationSlot) time_to_slot = shortLog(timeToSlot) + offset = shortLog(chronosOffset) while true: await sleepAsync(timeToSlot)