diff options
Diffstat (limited to 'core/vm/gas_table.go')
-rw-r--r-- | core/vm/gas_table.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/vm/gas_table.go b/core/vm/gas_table.go index df79f86ec..9203e10a7 100644 --- a/core/vm/gas_table.go +++ b/core/vm/gas_table.go @@ -121,7 +121,9 @@ func gasSStore(gt params.GasTable, evm *EVM, contract *Contract, stack *Stack, m current = evm.StateDB.GetState(contract.Address(), common.BigToHash(x)) ) // The legacy gas metering only takes into consideration the current state - if !evm.chainRules.IsConstantinople { + // Legacy rules should be applied if we are in Petersburg (removal of EIP-1283) + // OR Constantinople is not active + if evm.chainRules.IsPetersburg || !evm.chainRules.IsConstantinople { // This checks for 3 scenario's and calculates gas accordingly: // // 1. From a zero-value address to a non-zero value (NEW VALUE) |