mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-26 03:59:52 +00:00
convert 'block' into 'if-else' in evmc 'setStorage'
This commit is contained in:
parent
9b1f8e2f65
commit
18eb255758
@ -51,13 +51,10 @@ proc hostSetStorageImpl(ctx: Computation, address: var evmc_address,
|
||||
gasRefund = 0.GasInt
|
||||
origValue = 0.u256
|
||||
|
||||
block:
|
||||
if newValue == currValue:
|
||||
status = EVMC_STORAGE_UNCHANGED
|
||||
break
|
||||
|
||||
if newValue == currValue:
|
||||
status = EVMC_STORAGE_UNCHANGED
|
||||
else:
|
||||
origValue = statedb.getCommittedStorage(storageAddr, slot)
|
||||
|
||||
if origValue == currValue or ctx.fork < FkIstanbul:
|
||||
if currValue == 0:
|
||||
status = EVMC_STORAGE_ADDED
|
||||
@ -65,7 +62,6 @@ proc hostSetStorageImpl(ctx: Computation, address: var evmc_address,
|
||||
status = EVMC_STORAGE_DELETED
|
||||
else:
|
||||
status = EVMC_STORAGE_MODIFIED_AGAIN
|
||||
|
||||
ctx.vmState.mutateStateDB:
|
||||
db.setStorage(storageAddr, slot, newValue)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user