Do account copy

pull/375/head^2
Joran Honig 6 years ago
parent b7c67962d8
commit ab4c49e78c
  1. 9
      mythril/laser/ethereum/instructions.py

@ -707,13 +707,8 @@ class Instruction:
index = str(index)
try:
# Create a fresh copy of the account object before modifying storage
for k in global_state.accounts:
if global_state.accounts[k] == global_state.environment.active_account:
global_state.accounts[k] = deepcopy(global_state.accounts[k])
global_state.environment.active_account = global_state.accounts[k]
break
global_state.environment.active_account = deepcopy(global_state.environment.active_account)
global_state.accounts[global_state.environment.active_account.address] = global_state.environment.active_account
global_state.environment.active_account.storage[index] = value
except KeyError:

Loading…
Cancel
Save