make constants 64-bit portably (#5755)
This commit is contained in:
parent
7443a4ac08
commit
8cfce83864
|
@ -38,7 +38,8 @@ type
|
||||||
proc init*(T: type BeaconClock, genesis_time: uint64): Opt[T] =
|
proc init*(T: type BeaconClock, genesis_time: uint64): Opt[T] =
|
||||||
# Since we'll be converting beacon time differences to nanoseconds,
|
# Since we'll be converting beacon time differences to nanoseconds,
|
||||||
# the time can't be outrageously far from now
|
# 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:
|
genesis_time < GENESIS_SLOT * SECONDS_PER_SLOT:
|
||||||
Opt.none(BeaconClock)
|
Opt.none(BeaconClock)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue