fix: stabilize multichain hub and follower sync flow
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

This commit is contained in:
aitbc
2026-04-13 14:31:23 +02:00
parent d72945f20c
commit bc96e47b8f
9 changed files with 469 additions and 234 deletions

View File

@@ -214,7 +214,7 @@ class ChainSync:
with self._session_factory() as session:
# Check for duplicate
existing = session.exec(
select(Block).where(Block.hash == block_hash)
select(Block).where(Block.chain_id == self._chain_id).where(Block.hash == block_hash)
).first()
if existing:
metrics_registry.increment("sync_blocks_duplicate_total")