fix min index

This commit is contained in:
user 2025-03-05 03:15:09 +03:00
parent 7448023642
commit f0ded2158e
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ async def indexer_loop(memory, platform_found: bool, seqno: int) -> [bool, int]:
StoredContent.onchain_index != None StoredContent.onchain_index != None
).order_by(StoredContent.onchain_index.desc()).first() ).order_by(StoredContent.onchain_index.desc()).first()
last_known_index = last_known_index.onchain_index if last_known_index else 0 last_known_index = last_known_index.onchain_index if last_known_index else 0
last_known_index = max(last_known_index, 0) last_known_index = max(last_known_index, 1)
make_log("Indexer", f"Last known index: {last_known_index}", level="debug") make_log("Indexer", f"Last known index: {last_known_index}", level="debug")
next_item_index = last_known_index + 1 next_item_index = last_known_index + 1