handle both baseFee and baseFeePerGas in test_setChainParams (#2427)

Signed-off-by: garyschulte <garyschulte@gmail.com>
pull/2433/head
garyschulte 3 years ago committed by GitHub
parent 7c68d05615
commit fd74cbfb74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/methods/TestSetChainParams.java

@ -136,9 +136,10 @@ public class TestSetChainParams implements JsonRpcMethod {
if (params.containsKey("londonForkBlock")) {
// TODO EIP-1559 change for the actual fork name when known
JsonObject genesisConfig = chainParamsJson.getJsonObject("genesis", new JsonObject());
ExperimentalEIPs.initialBasefee =
Optional.ofNullable(
chainParamsJson.getJsonObject("genesis", new JsonObject()).getString("baseFee"))
genesisConfig.getString("baseFeePerGas", genesisConfig.getString("baseFee")))
.map(Long::decode)
.orElse(ExperimentalEIPs.EIP1559_BASEFEE_DEFAULT_VALUE);
}

Loading…
Cancel
Save