From f5180e0840f307c7296b15470107a53cdbf2725c Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Mon, 15 Mar 2021 16:26:41 +0100 Subject: [PATCH] Revert "Nim-1.2.10" (#2411) This reverts commit 12e15a0b8dbb3356cce22dc492b824237b4858d0. --- Makefile | 4 +--- beacon_chain/beacon_clock.nim | 7 +------ vendor/nimbus-build-system | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 3963b8ae2..6429d0231 100644 --- a/Makefile +++ b/Makefile @@ -282,9 +282,7 @@ ifneq ($(USE_LIBBACKTRACE), 0) build/generate_makefile: | libbacktrace endif build/generate_makefile: tools/generate_makefile.nim | deps-common - echo -e $(BUILD_MSG) "$@" && \ - $(ENV_SCRIPT) nim c -o:$@ $(NIM_PARAMS) tools/generate_makefile.nim && \ - echo -e $(BUILD_END_MSG) "$@" + $(ENV_SCRIPT) nim c -o:$@ $(NIM_PARAMS) tools/generate_makefile.nim # GCC's LTO parallelisation is able to detect a GNU Make jobserver and get its # maximum number of processes from there, but only if we use the "+" prefix. diff --git a/beacon_chain/beacon_clock.nim b/beacon_chain/beacon_clock.nim index c7c2466cb..7a9b1845e 100644 --- a/beacon_chain/beacon_clock.nim +++ b/beacon_chain/beacon_clock.nim @@ -78,12 +78,7 @@ func toSlot*(c: BeaconClock, t: Time): tuple[afterGenesis: bool, slot: Slot] = c.toBeaconTime(t).toSlot() func toBeaconTime*(s: Slot, offset = Duration()): BeaconTime = - # BeaconTime/Duration stores nanoseconds, internally - const maxSlot = (not 0'u64 div 2 div SECONDS_PER_SLOT div 1_000_000_000).Slot - var slot = s - if slot > maxSlot: - slot = maxSlot - BeaconTime(seconds(int64(uint64(slot) * SECONDS_PER_SLOT)) + offset) + BeaconTime(seconds(int64(uint64(s) * SECONDS_PER_SLOT)) + offset) proc now*(c: BeaconClock): BeaconTime = ## Current time, in slots - this may end up being less than GENESIS_SLOT(!) diff --git a/vendor/nimbus-build-system b/vendor/nimbus-build-system index 2c1e94d59..e7694f16c 160000 --- a/vendor/nimbus-build-system +++ b/vendor/nimbus-build-system @@ -1 +1 @@ -Subproject commit 2c1e94d595b80a2d247875fe813242bbe6a0ade7 +Subproject commit e7694f16ceccd7c98ecb6870263025018b7d37b3