Commit Graph

2 Commits

Author SHA1 Message Date
aitbc
d3415413b3 Add hash conflict detection and cleanup across chains in import operations and improve database initialization
Some checks failed
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
API Endpoint Tests / test-api-endpoints (push) Has been cancelled
- Add hash conflict detection in import_block to delete existing blocks with same hash
- Add hash conflict cleanup in import_chain before importing blocks
- Add logging for hash conflict deletions showing affected chains
- Add WAL file permission setting in init_db for .db-shm and .db-wal files
- Add test_import_chain_clears_hash_conflicts_across_chains to verify cross-chain hash cleanup
2026-04-15 08:17:35 +02:00
aitbc
f9fb3ea053 Fix chain import/export to handle duplicates, add metadata fields, and improve datetime parsing
Some checks failed
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
- Add chain_id field to Block creation in import_block endpoint
- Remove await from synchronous session.commit in import_block
- Add _serialize_optional_timestamp helper to handle various timestamp formats
- Add _parse_datetime_value helper with proper datetime parsing and error handling
- Add _select_export_blocks to filter duplicate blocks by height during export
- Add _dedupe_import_blocks to filter
2026-04-14 12:33:44 +02:00