Fix tabs vs spaces from mergetool

pull/335/head
Joran Honig 6 years ago
parent 4522a30d8f
commit 5e6bbccc84
  1. 11
      mythril/laser/ethereum/svm.py

@ -24,7 +24,9 @@ class LaserEVM:
""" """
Laser EVM class Laser EVM class
""" """
def __init__(self, accounts, dynamic_loader=None, max_depth=float('inf'), execution_timeout=60, strategy=DepthFirstSearchStrategy):
def __init__(self, accounts, dynamic_loader=None, max_depth=float('inf'), execution_timeout=60,
strategy=DepthFirstSearchStrategy):
self.instructions_covered = [] self.instructions_covered = []
self.accounts = accounts self.accounts = accounts
@ -38,7 +40,7 @@ class LaserEVM:
self.strategy = strategy(self.work_list, max_depth) self.strategy = strategy(self.work_list, max_depth)
self.max_depth = max_depth self.max_depth = max_depth
self.execution_timeout = execution_timeout self.execution_timeout = execution_timeout
self.time = None self.time = None
self.pre_hooks = {} self.pre_hooks = {}
self.post_hooks = {} self.post_hooks = {}
@ -147,7 +149,8 @@ class LaserEVM:
environment.active_function_name = disassembly.addr_to_func[address] environment.active_function_name = disassembly.addr_to_func[address]
new_node.flags |= NodeFlags.FUNC_ENTRY new_node.flags |= NodeFlags.FUNC_ENTRY
logging.info("- Entering function " + environment.active_account.contract_name + ":" + new_node.function_name) logging.info(
"- Entering function " + environment.active_account.contract_name + ":" + new_node.function_name)
elif address == 0: elif address == 0:
environment.active_function_name = "fallback" environment.active_function_name = "fallback"
@ -178,6 +181,7 @@ class LaserEVM:
self.pre_hooks[op_code] = [] self.pre_hooks[op_code] = []
self.pre_hooks[op_code].append(function) self.pre_hooks[op_code].append(function)
return function return function
return hook_decorator return hook_decorator
def post_hook(self, op_code): def post_hook(self, op_code):
@ -186,4 +190,5 @@ class LaserEVM:
self.post_hooks[op_code] = [] self.post_hooks[op_code] = []
self.post_hooks[op_code].append(function) self.post_hooks[op_code].append(function)
return function return function
return hook_decorator return hook_decorator

Loading…
Cancel
Save