Skip to content

Conversation

@pgherveou
Copy link
Contributor

@pgherveou pgherveou commented Jan 30, 2026

hot fix from #10950

When a blockchain re-org occurs and the same transaction is included in a
different block, the INSERT into transaction_hashes would fail with a
UNIQUE constraint violation if the server had restarted (losing the
in-memory block_number_to_hashes map used for pruning).

This change uses INSERT OR REPLACE to update the block_hash when a
transaction is re-included in a different block after a re-org, matching
the pattern already used for insert_block_mapping.

Fixes: UNIQUE constraint failed: transaction_hashes.transaction_hash
@EgorPopelyaev EgorPopelyaev enabled auto-merge (squash) January 30, 2026 16:14
@EgorPopelyaev EgorPopelyaev added the R0-no-crate-publish-required The change does not require any crates to be re-published. label Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R0-no-crate-publish-required The change does not require any crates to be re-published.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants