Skip to content

Commit 09d1307

Browse files
add missing activation check
1 parent 65f92b6 commit 09d1307

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rskj-core/src/main/java/org/ethereum/core/TransactionExecutor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,10 @@ public ProgramResult getResult() {
571571
}
572572

573573
public long getGasUsed() {
574-
return GasCost.subtract(GasCost.toGas(tx.getGasLimit()), mEndGas);
574+
if (activations.isActive(ConsensusRule.RSKIP136)) {
575+
return GasCost.subtract(GasCost.toGas(tx.getGasLimit()), mEndGas);
576+
}
577+
return toBI(tx.getGasLimit()).subtract(toBI(mEndGas)).longValue();
575578
}
576579

577580
public Coin getPaidFees() { return paidFees; }

0 commit comments

Comments
 (0)