Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
terencechain committed Dec 11, 2024
1 parent 5c771f6 commit 320a1e5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beacon-chain/rpc/eth/config/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,9 @@ func TestGetSpec(t *testing.T) {
case "MIN_EPOCHS_FOR_BLOCK_REQUESTS":
assert.Equal(t, "33024", v)
case "GOSSIP_MAX_SIZE":
assert.Equal(t, "10485760", v)
assert.Equal(t, "15728640", v)
case "MAX_CHUNK_SIZE":
assert.Equal(t, "10485760", v)
assert.Equal(t, "15728640", v)
case "ATTESTATION_SUBNET_COUNT":
assert.Equal(t, "64", v)
case "MAXIMUM_GOSSIP_CLOCK_DISPARITY":
Expand Down
6 changes: 6 additions & 0 deletions config/params/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ func TestLoadConfigFile(t *testing.T) {
mnf, err := params.UnmarshalConfigFile(mainnetConfigFile, nil)
require.NoError(t, err)
fields := fieldsFromYamls(t, append(mainnetPresetsFiles, mainnetConfigFile))
// TODO(#14714): remove hard coded sizes once spec is updated
mnf.MaxChunkSize = 15728640
mnf.GossipMaxSize = 15728640
assertEqualConfigs(t, "mainnet", fields, mn, mnf)
})

Expand All @@ -212,6 +215,9 @@ func TestLoadConfigFile(t *testing.T) {
minf, err := params.UnmarshalConfigFile(minimalConfigFile, nil)
require.NoError(t, err)
fields := fieldsFromYamls(t, append(minimalPresetsFiles, minimalConfigFile))
// TODO(#14714): remove hard coded sizes once spec is updated
minf.MaxChunkSize = 15728640
minf.GossipMaxSize = 15728640
assertEqualConfigs(t, "minimal", fields, min, minf)
})

Expand Down
3 changes: 3 additions & 0 deletions config/params/testnet_holesky_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ func TestHoleskyConfigMatchesUpstreamYaml(t *testing.T) {
pcfg, err := params.UnmarshalConfigFile(configFP, nil)
require.NoError(t, err)
fields := fieldsFromYamls(t, append(presetFPs, configFP))
// TODO(#14714): remove hard coded sizes once spec is updated
pcfg.MaxChunkSize = 15728640
pcfg.GossipMaxSize = 15728640
assertYamlFieldsMatch(t, "holesky", fields, pcfg, params.HoleskyConfig())
}
3 changes: 3 additions & 0 deletions config/params/testnet_sepolia_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ func TestSepoliaConfigMatchesUpstreamYaml(t *testing.T) {
pcfg, err := params.UnmarshalConfigFile(configFP, nil)
require.NoError(t, err)
fields := fieldsFromYamls(t, append(presetFPs, configFP))
// TODO(#14714): remove hard coded sizes once spec is updated
pcfg.MaxChunkSize = 15728640
pcfg.GossipMaxSize = 15728640
assertYamlFieldsMatch(t, "sepolia", fields, pcfg, params.SepoliaConfig())
}

0 comments on commit 320a1e5

Please sign in to comment.