From 55b4af9f92bde7195dab9b973c09b46094ace415 Mon Sep 17 00:00:00 2001 From: Potuz Date: Tue, 21 Jun 2022 15:12:08 -0300 Subject: [PATCH] track the wall clock on forkchoice spectests (#10916) --- testing/spectest/shared/common/forkchoice/builder.go | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/spectest/shared/common/forkchoice/builder.go b/testing/spectest/shared/common/forkchoice/builder.go index 49080e49d..6df771c53 100644 --- a/testing/spectest/shared/common/forkchoice/builder.go +++ b/testing/spectest/shared/common/forkchoice/builder.go @@ -39,6 +39,7 @@ func NewBuilder(t testing.TB, initialState state.BeaconState, initialBlock inter // Tick resets the genesis time to now()-tick and adjusts the slot to the appropriate value. func (bb *Builder) Tick(t testing.TB, tick int64) { bb.service.SetGenesisTime(time.Unix(time.Now().Unix()-tick, 0)) + bb.service.ForkChoicer().SetGenesisTime(uint64(time.Now().Unix() - tick)) if tick > bb.lastTick { slot := uint64(tick) / params.BeaconConfig().SecondsPerSlot require.NoError(t, bb.service.NewSlot(context.TODO(), types.Slot(slot)))