- Add DISTINCT clause to block query in export_chain to prevent duplicate blocks in export
- Add chain_id filter to all delete operations in import_chain (blocks, accounts, transactions)
- Add commit after deletions before starting imports to ensure clean state
- Add duplicate block filtering by height before import to prevent UNIQUE constraint violations
- Add logging for deletion operations showing chain_id being cleared