Make name more verbose

pull/549/head
Joran Honig 6 years ago
parent 5e9f613911
commit 9fb6a81df1
  1. 20
      mythril/laser/ethereum/svm.py

@ -138,30 +138,30 @@ class LaserEVM:
new_global_states = self._end_message_call(return_global_state, global_state, new_global_states = self._end_message_call(return_global_state, global_state,
revert_changes=True, return_data=None) revert_changes=True, return_data=None)
except TransactionStartSignal as e: except TransactionStartSignal as start_signal:
# Setup new global state # Setup new global state
new_global_state = e.transaction.initial_global_state() new_global_state = start_signal.transaction.initial_global_state()
new_global_state.transaction_stack = copy(global_state.transaction_stack) + [(e.transaction, global_state)] new_global_state.transaction_stack = copy(global_state.transaction_stack) + [(start_signal.transaction, global_state)]
new_global_state.node = global_state.node new_global_state.node = global_state.node
new_global_state.mstate.constraints = global_state.mstate.constraints new_global_state.mstate.constraints = global_state.mstate.constraints
return [new_global_state], op_code return [new_global_state], op_code
except TransactionEndSignal as e: except TransactionEndSignal as end_signal:
transaction, return_global_state = e.global_state.transaction_stack.pop() transaction, return_global_state = end_signal.global_state.transaction_stack.pop()
if return_global_state is None: if return_global_state is None:
if (not isinstance(transaction, ContractCreationTransaction) or transaction.return_data) and not e.revert: if (not isinstance(transaction, ContractCreationTransaction) or transaction.return_data) and not end_signal.revert:
e.global_state.world_state.node = global_state.node end_signal.global_state.world_state.node = global_state.node
self.open_states.append(e.global_state.world_state) self.open_states.append(end_signal.global_state.world_state)
new_global_states = [] new_global_states = []
else: else:
# First execute the post hook for the transaction ending instruction # First execute the post hook for the transaction ending instruction
self._execute_post_hook(op_code, [e.global_state]) self._execute_post_hook(op_code, [end_signal.global_state])
new_global_states = self._end_message_call(return_global_state, global_state, new_global_states = self._end_message_call(return_global_state, global_state,
revert_changes=False or e.revert, revert_changes=False or end_signal.revert,
return_data=transaction.return_data) return_data=transaction.return_data)
self._execute_post_hook(op_code, new_global_states) self._execute_post_hook(op_code, new_global_states)

Loading…
Cancel
Save