Skip to content

Commit

Permalink
don't fail in test config, display warning if eph addresses are set a…
Browse files Browse the repository at this point in the history
…nd set them to 0
  • Loading branch information
Tofel committed Apr 24, 2024
1 parent c2a6f5c commit 2b9bf7c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions integration-tests/testconfig/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,9 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) {
}

if testConfig.Seth != nil && !isAnySimulated && (testConfig.Seth.EphemeralAddrs != nil && *testConfig.Seth.EphemeralAddrs != 0) {
msg := `
Error: Ephemeral Addresses Misconfigured
Your configuration contains %d ephemeral address(es), which are only permissible for use with simulated networks. Using them on live networks poses a risk of losing your funds. Please adjust your TOML configuration file to ensure proper settings:
[Seth]
ephemeral_addresses_number = 0
`
return TestConfig{}, fmt.Errorf(msg, *testConfig.Seth.EphemeralAddrs)
testConfig.Seth.EphemeralAddrs = new(int64)
logger.Warn().
Msg("Ephemeral addresses were enabled, but test was setup to run on a live network. Ephemeral addresses will be disabled.")
}

if testConfig.Seth != nil && (testConfig.Seth.EphemeralAddrs != nil && *testConfig.Seth.EphemeralAddrs != 0) {
Expand Down

0 comments on commit 2b9bf7c

Please sign in to comment.