From af816e14d403a362e424c9c1152470ea67d49a53 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 11 Apr 2024 16:33:54 -0400 Subject: [PATCH] clear redis if no db state available --- src/dexorder/bin/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dexorder/bin/main.py b/src/dexorder/bin/main.py index 89eb87c..5c53dba 100644 --- a/src/dexorder/bin/main.py +++ b/src/dexorder/bin/main.py @@ -83,12 +83,12 @@ async def main(): state = await db_state.load() if state is None: log.info('no state in database') + await redis_state.clear() else: current_blockstate.set(state) if redis_state: await redis_state.init(state, state.root_fork) log.info(f'loaded state from db for root block {state.root_branch.height}') - runner = BlockStateRunner(state, publish_all=publish_all if redis_state else None) setup_logevent_triggers(runner) # OHLC printing hard-disabled for main. Use the finaldata process.