Skip to content

Commit

Permalink
fix: revert code and storage
Browse files Browse the repository at this point in the history
  • Loading branch information
daejunpark committed Dec 6, 2023
1 parent beaf503 commit efb88af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/halmos/sevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1711,8 +1711,8 @@ def callback(new_ex, stack, step_id):

if not subcall_success:
# revert network states
new_ex.code = orig_code
new_ex.storage = orig_storage
new_ex.code = orig_code.copy()
new_ex.storage = deepcopy(orig_storage)
new_ex.balance = orig_balance

# add to worklist even if it reverted during the external call
Expand Down Expand Up @@ -2000,8 +2000,8 @@ def callback(new_ex, stack, step_id):
new_ex.st.push(con(0))

# revert network states
new_ex.code = orig_code
new_ex.storage = orig_storage
new_ex.code = orig_code.copy()
new_ex.storage = deepcopy(orig_storage)
new_ex.balance = orig_balance

# add to worklist
Expand Down

0 comments on commit efb88af

Please sign in to comment.