Don't run in contract creation and 1st runtime tx

dependency_prune_v2
Bernhard Mueller 6 years ago
parent 0e3c04c835
commit 1c207b0591
  1. 5
      mythril/laser/ethereum/plugins/implementations/dependency_pruner.py

@ -226,7 +226,8 @@ class DependencyPruner(LaserPlugin):
:param annotation :param annotation
""" """
if self.iteration < 1: # Don't skip any blocks in the contract creation transaction
if self.iteration < 2:
return return
annotation.path.append(address) annotation.path.append(address)
@ -291,6 +292,8 @@ class DependencyPruner(LaserPlugin):
def world_state_filter_hook(state: GlobalState): def world_state_filter_hook(state: GlobalState):
if isinstance(state.current_transaction, ContractCreationTransaction): if isinstance(state.current_transaction, ContractCreationTransaction):
# Reset iteration variable
self.iteration = 0
return return
world_state_annotation = get_ws_dependency_annotation(state) world_state_annotation = get_ws_dependency_annotation(state)

Loading…
Cancel
Save