mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 04:54:05 -05:00
lock it
This commit is contained in:
@@ -16,7 +16,11 @@ func SetupTestConfigCleanup(t testing.TB) {
|
||||
prevNetworkCfg := networkConfig.Copy()
|
||||
t.Cleanup(func() {
|
||||
mainnetBeaconConfig = prevDefaultBeaconConfig
|
||||
// Lock the config, when cleaning up
|
||||
// otherwise the race detector is triggered.
|
||||
cfgrw.Lock()
|
||||
err = undo()
|
||||
cfgrw.Unlock()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user