diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/operations/RandomOperationTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/operations/PrevRanDaoOperationTest.java similarity index 90% rename from ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/operations/RandomOperationTest.java rename to ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/operations/PrevRanDaoOperationTest.java index 5a99ef897d..8633adc004 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/operations/RandomOperationTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/operations/PrevRanDaoOperationTest.java @@ -24,18 +24,18 @@ import org.hyperledger.besu.evm.frame.BlockValues; import org.hyperledger.besu.evm.frame.MessageFrame; import org.hyperledger.besu.evm.gascalculator.LondonGasCalculator; import org.hyperledger.besu.evm.operation.Operation; -import org.hyperledger.besu.evm.operation.RandomOperation; +import org.hyperledger.besu.evm.operation.PrevRanDaoOperation; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.units.bigints.UInt256; import org.junit.Test; -public class RandomOperationTest { +public class PrevRanDaoOperationTest { @Test public void pushesRandWhenDifficultyZero() { - RandomOperation op = new RandomOperation(new LondonGasCalculator()); + PrevRanDaoOperation op = new PrevRanDaoOperation(new LondonGasCalculator()); MessageFrame messageFrame = mock(MessageFrame.class); BlockValues blockHeader = mock(BlockValues.class); Bytes32 rand = Bytes32.fromHexString("0xb0b0face"); @@ -50,7 +50,7 @@ public class RandomOperationTest { @Test public void pushesDifficultyWhenPresent() { - RandomOperation op = new RandomOperation(new LondonGasCalculator()); + PrevRanDaoOperation op = new PrevRanDaoOperation(new LondonGasCalculator()); MessageFrame messageFrame = mock(MessageFrame.class); BlockValues blockHeader = mock(BlockValues.class); Bytes32 rand = Bytes32.fromHexString("0xb0b0face"); diff --git a/evm/src/main/java/org/hyperledger/besu/evm/MainnetEVMs.java b/evm/src/main/java/org/hyperledger/besu/evm/MainnetEVMs.java index 5cccfe7cfb..1c5e4062fa 100644 --- a/evm/src/main/java/org/hyperledger/besu/evm/MainnetEVMs.java +++ b/evm/src/main/java/org/hyperledger/besu/evm/MainnetEVMs.java @@ -80,8 +80,8 @@ import org.hyperledger.besu.evm.operation.OrOperation; import org.hyperledger.besu.evm.operation.OriginOperation; import org.hyperledger.besu.evm.operation.PCOperation; import org.hyperledger.besu.evm.operation.PopOperation; +import org.hyperledger.besu.evm.operation.PrevRanDaoOperation; import org.hyperledger.besu.evm.operation.PushOperation; -import org.hyperledger.besu.evm.operation.RandomOperation; import org.hyperledger.besu.evm.operation.ReturnDataCopyOperation; import org.hyperledger.besu.evm.operation.ReturnDataSizeOperation; import org.hyperledger.besu.evm.operation.ReturnOperation; @@ -393,6 +393,6 @@ public abstract class MainnetEVMs { final GasCalculator gasCalculator, final BigInteger chainID) { registerLondonOperations(registry, gasCalculator, chainID); - registry.put(new RandomOperation(gasCalculator)); + registry.put(new PrevRanDaoOperation(gasCalculator)); } } diff --git a/evm/src/main/java/org/hyperledger/besu/evm/operation/RandomOperation.java b/evm/src/main/java/org/hyperledger/besu/evm/operation/PrevRanDaoOperation.java similarity index 85% rename from evm/src/main/java/org/hyperledger/besu/evm/operation/RandomOperation.java rename to evm/src/main/java/org/hyperledger/besu/evm/operation/PrevRanDaoOperation.java index b09a53188d..638946fddd 100644 --- a/evm/src/main/java/org/hyperledger/besu/evm/operation/RandomOperation.java +++ b/evm/src/main/java/org/hyperledger/besu/evm/operation/PrevRanDaoOperation.java @@ -20,10 +20,10 @@ import org.hyperledger.besu.evm.gascalculator.GasCalculator; import org.apache.tuweni.units.bigints.UInt256; -public class RandomOperation extends AbstractFixedCostOperation { +public class PrevRanDaoOperation extends AbstractFixedCostOperation { - public RandomOperation(final GasCalculator gasCalculator) { - super(0x44, "RANDOM", 0, 1, 1, gasCalculator, gasCalculator.getBaseTierGasCost()); + public PrevRanDaoOperation(final GasCalculator gasCalculator) { + super(0x44, "PREVRANDAO", 0, 1, 1, gasCalculator, gasCalculator.getBaseTierGasCost()); } @Override