From 31a2bd4368edd00abf7e9bfb188073c009ba9ee1 Mon Sep 17 00:00:00 2001 From: Bartek Tofel Date: Thu, 14 Mar 2024 10:22:43 +0100 Subject: [PATCH] add gas limit for Fiji, fix a situation when new networks were ignored --- integration-tests/testconfig/default.toml | 1 + integration-tests/testconfig/testconfig.go | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/integration-tests/testconfig/default.toml b/integration-tests/testconfig/default.toml index 06c792be882..1bcb4b3350c 100644 --- a/integration-tests/testconfig/default.toml +++ b/integration-tests/testconfig/default.toml @@ -62,6 +62,7 @@ name = "Fuji" chain_id = "43113" transaction_timeout = "3m" transfer_gas_fee = 21_000 +gas_limit = 8_000_000 # legacy transactions gas_price = 30_000_000_000 # EIP-1559 transactions diff --git a/integration-tests/testconfig/testconfig.go b/integration-tests/testconfig/testconfig.go index 836beb5ff4e..e30b209fd55 100644 --- a/integration-tests/testconfig/testconfig.go +++ b/integration-tests/testconfig/testconfig.go @@ -594,14 +594,24 @@ func handleDefaultConfigOverride(logger zerolog.Logger, filename, configurationN // override instead of merging if (newConfig.Seth != nil && len(newConfig.Seth.Networks) > 0) && (oldConfig != nil && oldConfig.Seth != nil && len(oldConfig.Seth.Networks) > 0) { + networksToUse := map[string]*seth.Network{} for i, old_network := range oldConfig.Seth.Networks { for _, new_network := range newConfig.Seth.Networks { if old_network.ChainID == new_network.ChainID { oldConfig.Seth.Networks[i] = new_network + break + } else { + if _, ok := networksToUse[new_network.ChainID]; !ok { + networksToUse[new_network.ChainID] = new_network + } } } + networksToUse[old_network.ChainID] = oldConfig.Seth.Networks[i] + } + target.Seth.Networks = []*seth.Network{} + for _, network := range networksToUse { + target.Seth.Networks = append(target.Seth.Networks, network) } - target.Seth.Networks = oldConfig.Seth.Networks } return nil