mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-01 07:51:21 +00:00
546196a6fa
* e2e docs * slasher docs * Merge branch 'other-package-godocs' of github.com:prysmaticlabs/prysm into other-package-godocs * all validator package comments * Merge branch 'master' into other-package-godocs * completed all other packages * Merge branch 'master' into other-package-godocs * Merge refs/heads/master into other-package-godocs
29 lines
725 B
Go
29 lines
725 B
Go
// Package spectest allows for easy switching of chain
|
|
// configuration parameters in spec conformity unit tests.
|
|
package spectest
|
|
|
|
import (
|
|
"errors"
|
|
"fmt"
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
)
|
|
|
|
// SetConfig sets the global params for spec tests depending on the option chosen.
|
|
func SetConfig(config string) error {
|
|
switch config {
|
|
case "minimal":
|
|
newConfig := params.MinimalSpecConfig()
|
|
params.OverrideBeaconConfig(newConfig)
|
|
return nil
|
|
case "mainnet":
|
|
newConfig := params.MainnetConfig()
|
|
params.OverrideBeaconConfig(newConfig)
|
|
return nil
|
|
case "":
|
|
return errors.New("no config provided")
|
|
default:
|
|
return fmt.Errorf("did not receive a valid config, instead received this %s", config)
|
|
}
|
|
}
|