mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 03:51:29 +00:00
f3d6dbcc1e
* config params into pkg * gaz Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
17 lines
511 B
Go
17 lines
511 B
Go
package params
|
|
|
|
import "testing"
|
|
|
|
// SetupTestConfigCleanup preserves configurations allowing to modify them within tests without any
|
|
// restrictions, everything is restored after the test.
|
|
func SetupTestConfigCleanup(t testing.TB) {
|
|
prevDefaultBeaconConfig := mainnetBeaconConfig.Copy()
|
|
prevBeaconConfig := beaconConfig.Copy()
|
|
prevNetworkCfg := networkConfig.Copy()
|
|
t.Cleanup(func() {
|
|
mainnetBeaconConfig = prevDefaultBeaconConfig
|
|
beaconConfig = prevBeaconConfig
|
|
networkConfig = prevNetworkCfg
|
|
})
|
|
}
|