From f052ecd30d10573f823fca6267a5c5ff48d49544 Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 22 Jan 2024 00:42:09 -0400 Subject: [PATCH] runner time tick bugfix --- src/dexorder/runner.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/dexorder/runner.py b/src/dexorder/runner.py index e4ecdef..7ba8463 100644 --- a/src/dexorder/runner.py +++ b/src/dexorder/runner.py @@ -269,7 +269,6 @@ class BlockStateRunner: log.debug(f'block {block.hash} was already processed') return latest_block.set(block) - current_clock.get().set(block.timestamp) if self.state is None: # initialize self.state = BlockState(block) @@ -383,19 +382,9 @@ class BlockStateRunner: session.close() - async def handle_time_tick(self, blockhash): + async def handle_time_tick(self, block): if current_blockstate.get() is None: return - try: - blockhash = blockhash['hash'] - except TypeError: - pass - # similar to handle_head, but we only call the postprocess events, since there was only a time tick and no new block data - try: - block = self.state.by_hash[blockhash] - except KeyError: - log.warning(f'No block data for {blockhash}. Aborting time tick.') - return fork = self.state.fork(block) current_block.set(block) current_fork.set(fork)