refactor propagation logic to be more generic

pull/1353/head
Joran Honig 5 years ago
parent 4ec4ef242f
commit 5e140d6f1e
  1. 22
      mythril/laser/ethereum/svm.py

@ -372,21 +372,13 @@ class LaserEVM:
# 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, [end_signal.global_state]) self._execute_post_hook(op_code, [end_signal.global_state])
# TODO: Remove the following section from the svm # Propagate annotations
# ================================================================ new_annotations = [
# Propogate codecall based annotations annotation
if return_global_state.get_current_instruction()["opcode"] in ( for annotation in global_state.annotations
"DELEGATECALL", if annotation.persist_over_calls
"CALLCODE", ]
): return_global_state.add_annotations(new_annotations)
new_annotations = [
annotation
for annotation in global_state.get_annotations(
MutationAnnotation
)
]
return_global_state.add_annotations(new_annotations)
# ================================================================
new_global_states = self._end_message_call( new_global_states = self._end_message_call(
copy(return_global_state), copy(return_global_state),

Loading…
Cancel
Save