From 513e0f6ac66a94c37cced7e334977331d3c0fb84 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Thu, 28 Sep 2023 18:56:32 -0500 Subject: [PATCH] fix shanghai warm coinbase activation Signed-off-by: Danno Ferrin --- .../main/java/org/hyperledger/besu/evmtool/EvmToolCommand.java | 2 +- .../main/java/org/hyperledger/besu/evm/fluent/EVMExecutor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/EvmToolCommand.java b/ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/EvmToolCommand.java index efe6fe82a13..f910de3197e 100644 --- a/ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/EvmToolCommand.java +++ b/ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/EvmToolCommand.java @@ -407,7 +407,7 @@ public void run() { .miningBeneficiary(blockHeader.getCoinbase()) .blockHashLookup(new CachingBlockHashLookup(blockHeader, component.getBlockchain())) .accessListWarmAddresses( - EvmSpecVersion.SHANGHAI.compareTo(evm.getEvmVersion()) >= 0 + EvmSpecVersion.SHANGHAI.compareTo(evm.getEvmVersion()) <= 0 ? Set.of(coinbase) : Set.of()) .build(); diff --git a/evm/src/main/java/org/hyperledger/besu/evm/fluent/EVMExecutor.java b/evm/src/main/java/org/hyperledger/besu/evm/fluent/EVMExecutor.java index f2f445fe7b0..32e477a2cf4 100644 --- a/evm/src/main/java/org/hyperledger/besu/evm/fluent/EVMExecutor.java +++ b/evm/src/main/java/org/hyperledger/besu/evm/fluent/EVMExecutor.java @@ -702,7 +702,7 @@ public EVMExecutor contract(final Address contract) { public EVMExecutor coinbase(final Address coinbase) { this.coinbase = coinbase; // EIP-3651 - if (EvmSpecVersion.SHANGHAI.compareTo(evm.getEvmVersion()) >= 0) { + if (EvmSpecVersion.SHANGHAI.compareTo(evm.getEvmVersion()) <= 0) { this.warmAddress(coinbase); } return this;