Refactor transaction handling to ensure safe access. #271
Open
Ignacio-87 wants to merge 4 commits intodevfrom
Open
Refactor transaction handling to ensure safe access. #271Ignacio-87 wants to merge 4 commits intodevfrom
Ignacio-87 wants to merge 4 commits intodevfrom
Conversation
…s to unwrap transactions safely
jonasmartin
reviewed
Feb 19, 2026
…us usage - Add IndexerError mapping in errors.rs using #[from] attribute - Replace tx_status.tx unwrapping with tx_status.tx_or_err()? in multiple files: - dispute/tx_news.rs - union/accept_pegin.rs - union/advance_funds.rs - union/dispute_core.rs - cardinal/slot.rs - Fix tx_id() method call to use tx.compute_txid() in slot.rs - Replace block_info.unwrap() with block_info_or_err()? to fix ownership issues - Add TransactionStuckInMempool pattern match in bitvmx.rs
- Replace tx_status.tx.unwrap() with tx_status.tx_or_err()? in lock.rs - Update lockservice.rs example to match the new pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updated coordinator changes: TransactionStatus has been extended with additional states: InMempool and NotFound, indicating that a transaction may be optional.
Related with others libs
Building with
override: rust-bitcoin-indexer: change-get-transaction
override: rust-bitvmx-transaction-monitor: improve-get-tx-status
override: rust-bitcoin-coordinator: change-get-transaction