Don't do unnecessary try catch

pull/485/head
Joran Honig 6 years ago
parent f7ee3e5fe3
commit 8b61134e8d
  1. 10
      mythril/analysis/modules/suicide.py

@ -53,12 +53,10 @@ def _analyze_state(state, node):
not_creator_constraints = []
if len(state.world_state.transaction_sequence) > 1:
try:
creator = state.world_state.transaction_sequence[0].caller
for transaction in state.world_state.transaction_sequence[1:]:
not_creator_constraints.append(Not(Extract(159, 0, transaction.caller) == Extract(159, 0, creator)))
except IndexError:
return []
creator = state.world_state.transaction_sequence[0].caller
for transaction in state.world_state.transaction_sequence[1:]:
not_creator_constraints.append(Not(Extract(159, 0, transaction.caller) == Extract(159, 0, creator)))
not_creator_constraints.append(Not(Extract(159, 0, transaction.caller) == 0))
try:
model = solver.get_model(node.constraints + not_creator_constraints)

Loading…
Cancel
Save