debug: add database query logging to import_block
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 4s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 1s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 2s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Cross-Node Transaction Testing / transaction-test (push) Successful in 3s
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

This commit is contained in:
aitbc
2026-05-02 16:52:03 +02:00
parent 989e298622
commit 000eb998f1

View File

@@ -367,6 +367,7 @@ class ChainSync:
select(Block).where(Block.chain_id == self._chain_id).order_by(Block.height.desc()).limit(1)
).first()
our_height = our_head.height if our_head else -1
print(f"[DB QUERY] chain_id={self._chain_id}, our_head={our_head}, our_height={our_height}")
# Case 1: Block extends our chain directly
if height == our_height + 1: