mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 00:27:38 +00:00
1b6547de6a
* Add deneb fork epoch * Fix test
29 lines
857 B
Go
29 lines
857 B
Go
package params_test
|
|
|
|
import (
|
|
"path"
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/build/bazel"
|
|
"github.com/prysmaticlabs/prysm/v4/config/params"
|
|
"github.com/prysmaticlabs/prysm/v4/testing/require"
|
|
)
|
|
|
|
func TestPraterConfigMatchesUpstreamYaml(t *testing.T) {
|
|
presetFPs := presetsFilePath(t, "mainnet")
|
|
mn, err := params.ByName(params.MainnetName)
|
|
require.NoError(t, err)
|
|
cfg := mn.Copy()
|
|
for _, fp := range presetFPs {
|
|
cfg, err = params.UnmarshalConfigFile(fp, cfg)
|
|
require.NoError(t, err)
|
|
}
|
|
fPath, err := bazel.Runfile("external/goerli_testnet")
|
|
require.NoError(t, err)
|
|
configFP := path.Join(fPath, "prater", "config.yaml")
|
|
pcfg, err := params.UnmarshalConfigFile(configFP, nil)
|
|
require.NoError(t, err)
|
|
fields := fieldsFromYamls(t, append(presetFPs, configFP))
|
|
assertYamlFieldsMatch(t, "prater", fields, pcfg, params.PraterConfig())
|
|
}
|