[PAN-2905] Handle exact value correctly (#1944)

When gas remaining is exactly 2300 we should also fail.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Danno Ferrin 5 years ago committed by GitHub
parent 684a01e202
commit aa91d6a685
  1. 2
      ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/vm/operations/SStoreOperation.java

@ -67,7 +67,7 @@ public class SStoreOperation extends AbstractOperation {
final EVM evm) { final EVM evm) {
if (frame.isStatic()) { if (frame.isStatic()) {
return Optional.of(ExceptionalHaltReason.ILLEGAL_STATE_CHANGE); return Optional.of(ExceptionalHaltReason.ILLEGAL_STATE_CHANGE);
} else if (frame.getRemainingGas().compareTo(minumumGasRemaining) < 0) { } else if (frame.getRemainingGas().compareTo(minumumGasRemaining) <= 0) {
return Optional.of(ExceptionalHaltReason.INSUFFICIENT_GAS); return Optional.of(ExceptionalHaltReason.INSUFFICIENT_GAS);
} else { } else {
return Optional.empty(); return Optional.empty();

Loading…
Cancel
Save