diff --git a/core/chains/evm/config/toml/defaults.go b/core/chains/evm/config/toml/defaults.go index da7320458ca..5cffe46d134 100644 --- a/core/chains/evm/config/toml/defaults.go +++ b/core/chains/evm/config/toml/defaults.go @@ -35,21 +35,6 @@ func init() { // read all default configs initReadDefaults() - // overrides should be applied as: - // fallback.toml(defaults dir) <- fallback.toml(env CL_CHAIN_FALLBACK) <- ChainSpecific.toml(env CL_CHAIN_DEFAULTS) - // - // the custom fallback gets processed and overrides the default fallback - if path := env.CustomFallback.Get(); path != "" { - _, chain, err := readConfig(path, os.ReadFile, true) - if err != nil { - if !errors.Is(err, errFallbackConfig) { - log.Fatalf("custom fallback config error: %s", err.Error()) - } - - fallback = chain - } - } - // check for and apply any overrides initApplyEVMOverrides() } @@ -134,8 +119,14 @@ func initApplyEVMOverrides() { // read the file to bytes path := evmDir + "/" + entry.Name() - chainID, chain, err := readConfig(path, os.ReadFile, false) + chainID, chain, err := readConfig(path, os.ReadFile, entry.Name() == "fallback.toml") if err != nil { + if errors.Is(err, errFallbackConfig) { + fallback = chain + + continue + } + log.Fatalf("custom defaults override failure (%s): %s", entry.Name(), err.Error()) } diff --git a/core/config/env/env.go b/core/config/env/env.go index 8a24ff21476..c34cd7f4f5e 100644 --- a/core/config/env/env.go +++ b/core/config/env/env.go @@ -21,7 +21,6 @@ var ( // Migrations env vars EVMChainIDNotNullMigration0195 = "CL_EVM_CHAINID_NOT_NULL_MIGRATION_0195" CustomDefaults = Var("CL_CHAIN_DEFAULTS") - CustomFallback = Var("CL_CHAIN_FALLBACK") ) // LOOPP commands and vars