always set extragas to specific value, to simplify selection (#610)

This commit is contained in:
Vyacheslav
2024-12-20 12:09:37 +02:00
committed by GitHub
parent c65119b307
commit 42da48be5f
2 changed files with 15 additions and 12 deletions

View File

@@ -82,7 +82,9 @@ class EthereumUpstreamSettingsDetector(
}.flatMapMany {
val gaslimit = String(it).drop(3).dropLast(1).toBigInteger(16) + (21182).toBigInteger()
val labels = mutableListOf(Pair("gas-limit", gaslimit.toString(10)))
labels.add(Pair("extra_gas_limit", gaslimit.toString(10)))
if (gaslimit.toLong() > 590_000_000L) {
labels.add(Pair("extra_gas_limit", 600_000_000.toString()))
}
Flux.fromIterable(labels)
}.onErrorResume {
Flux.empty()