mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 21:34:33 +00:00
put 'sstoreEvmc' behind 'when evmc_enabled'
This commit is contained in:
parent
f59dec7323
commit
f850c4a37b
@ -444,13 +444,14 @@ template sstoreImpl(c: Computation, slot, newValue: Uint256) =
|
||||
c.vmState.mutateStateDB:
|
||||
db.setStorage(c.msg.contractAddress, slot, newValue)
|
||||
|
||||
template sstoreEvmc(c: Computation, slot, newValue: Uint256) =
|
||||
let
|
||||
status = c.host.setStorage(c.msg.contractAddress, slot, newValue)
|
||||
gasParam = GasParams(kind: Op.Sstore, s_status: status)
|
||||
gasCost = c.gasCosts[Sstore].c_handler(newValue, gasParam)[0]
|
||||
when evmc_enabled:
|
||||
template sstoreEvmc(c: Computation, slot, newValue: Uint256) =
|
||||
let
|
||||
status = c.host.setStorage(c.msg.contractAddress, slot, newValue)
|
||||
gasParam = GasParams(kind: Op.Sstore, s_status: status)
|
||||
gasCost = c.gasCosts[Sstore].c_handler(newValue, gasParam)[0]
|
||||
|
||||
c.gasMeter.consumeGas(gasCost, &"SSTORE: {c.msg.contractAddress}[{slot}] -> {newValue}")
|
||||
c.gasMeter.consumeGas(gasCost, &"SSTORE: {c.msg.contractAddress}[{slot}] -> {newValue}")
|
||||
|
||||
op sstore, inline = false, slot, newValue:
|
||||
## 0x55, Save word to storage.
|
||||
|
Loading…
x
Reference in New Issue
Block a user