move constraint creation out of try context

pull/1032/head
Joran Honig 6 years ago
parent 31fd66acf5
commit 6887fbdc06
  1. 3
      mythril/analysis/modules/external_calls.py

@ -108,7 +108,6 @@ def _analyze_state(state):
def _is_precompile_call(global_state: GlobalState): def _is_precompile_call(global_state: GlobalState):
to = global_state.mstate.stack[-2] # type: BitVec to = global_state.mstate.stack[-2] # type: BitVec
try:
constraints = copy(global_state.mstate.constraints) constraints = copy(global_state.mstate.constraints)
constraints += [ constraints += [
Or( Or(
@ -116,6 +115,8 @@ def _is_precompile_call(global_state: GlobalState):
to > symbol_factory.BitVecVal(16, 256), to > symbol_factory.BitVecVal(16, 256),
) )
] ]
try:
solver.get_model(constraints) solver.get_model(constraints)
return False return False
except UnsatError: except UnsatError:

Loading…
Cancel
Save