clear redis if no db state available
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user