From d9fad8461f8a1d005d7e9b60195453187016c25d Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Wed, 1 Apr 2020 11:57:01 -0500 Subject: [PATCH] fix config override --- beacon-chain/p2p/fork_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/beacon-chain/p2p/fork_test.go b/beacon-chain/p2p/fork_test.go index 78f03cfae8ed..b4310a03d2df 100644 --- a/beacon-chain/p2p/fork_test.go +++ b/beacon-chain/p2p/fork_test.go @@ -189,6 +189,7 @@ func TestStartDiscv5_SameForkDigests_DifferentNextForkData(t *testing.T) { func TestDiscv5_AddRetrieveForkEntryENR(t *testing.T) { c := params.BeaconConfig() + originalConfig := c c.ForkVersionSchedule = map[uint64][]byte{ 0: params.BeaconConfig().GenesisForkVersion, 1: {0, 0, 0, 1}, @@ -200,6 +201,7 @@ func TestDiscv5_AddRetrieveForkEntryENR(t *testing.T) { c.NextForkEpoch = nextForkEpoch c.NextForkVersion = nextForkVersion params.OverrideBeaconConfig(c) + defer params.OverrideBeaconConfig(originalConfig) // We simulate being in epoch 1. secondsPerEpoch := params.BeaconConfig().SlotsPerEpoch * params.BeaconConfig().SecondsPerSlot