Add reset_start_time()

fix/timeout
Nikhil Parasaram 6 years ago
parent 566a994710
commit d8c4705b2f
  1. 1
      mythril/laser/ethereum/svm.py
  2. 3
      mythril/laser/ethereum/time_handler.py

@ -181,6 +181,7 @@ class LaserEVM:
initial_coverage = self._get_covered_instructions()
self.time = datetime.now()
time_handler.reset_start_time()
log.info(
"Starting message call transaction, iteration: {}, {} initial states".format(
i, len(self.open_states)

@ -7,6 +7,9 @@ class TimeHandler(object, metaclass=Singleton):
self._start_time = None
self._transaction_execution_timeout = None
def reset_start_time(self):
self._start_time = int(time.time() * 1000)
def start_execution(self, execution_time: int, transaction_count: int):
self._start_time = int(time.time() * 1000)
self._transaction_execution_timeout = execution_time * 1000 // transaction_count

Loading…
Cancel
Save