diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumUpstreamSettingsDetector.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumUpstreamSettingsDetector.kt index 3ee933c34..94889284e 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumUpstreamSettingsDetector.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/ethereum/EthereumUpstreamSettingsDetector.kt @@ -82,9 +82,7 @@ class EthereumUpstreamSettingsDetector( }.flatMapMany { val gaslimit = String(it).drop(3).dropLast(1).toBigInteger(16) + (21180).toBigInteger() val labels = mutableListOf(Pair("gas-limit", gaslimit.toString(10))) - if (gaslimit >= (600_000_000).toBigInteger()) { - labels.add(Pair("extra_gas_limit", "600000000")) - } + labels.add(Pair("extra_gas_limit", gaslimit.toString(10))) Flux.fromIterable(labels) }.onErrorResume { Flux.empty() diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/ethereum/EthereumUpstreamSettingsDetectorSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/ethereum/EthereumUpstreamSettingsDetectorSpec.groovy index 84d9a4fcb..dbe02f2bc 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/ethereum/EthereumUpstreamSettingsDetectorSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/ethereum/EthereumUpstreamSettingsDetectorSpec.groovy @@ -47,7 +47,8 @@ class EthereumUpstreamSettingsDetectorSpec extends Specification { new Pair("client_type", clientType), new Pair("client_version", version), new Pair("archive", "true"), - new Pair("gas-limit", "50000000") + new Pair("gas-limit", "50000000"), + new Pair("extra_gas_limit", "50000000") ) .expectComplete() .verify(Duration.ofSeconds(1))