Skip to content

Commit 28abb65

Browse files
committed
Revert subRefund in sstore gas comp for constantinople
1 parent c969e59 commit 28abb65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/evm/opFns.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ function updateSstoreGas(runState: RunState, found: any, value: Buffer) {
959959
// If original value is not 0
960960
if (current.length === 0) {
961961
// If current value is 0 (also means that new value is not 0), remove 15000 gas from refund counter. We can prove that refund counter will never go below 0.
962-
runState.eei.subRefund(new BN(runState._common.param('gasPrices', 'netSstoreClearRefund')))
962+
runState.eei._result.gasRefund.isub(new BN(runState._common.param('gasPrices', 'netSstoreClearRefund')))
963963
} else if (value.length === 0) {
964964
// If new value is 0 (also means that current value is not 0), add 15000 gas to refund counter.
965965
runState.eei.refundGas(new BN(runState._common.param('gasPrices', 'netSstoreClearRefund')))

0 commit comments

Comments
 (0)