make constants 64-bit portably (#5755)

This commit is contained in:
tersec 2024-01-16 01:26:18 +00:00 committed by GitHub
parent 7443a4ac08
commit 8cfce83864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,8 @@ type
proc init*(T: type BeaconClock, genesis_time: uint64): Opt[T] =
# Since we'll be converting beacon time differences to nanoseconds,
# the time can't be outrageously far from now
if genesis_time > (getTime().toUnix().uint64 + 100 * 365 * 24 * 60 * 60) or
if genesis_time > (getTime().toUnix().uint64 + 100'u64 * 365'u64 * 24'u64 *
60'u64 * 60'u64) or
genesis_time < GENESIS_SLOT * SECONDS_PER_SLOT:
Opt.none(BeaconClock)
else: