feat: Implement transaction status tracking with mempool detection and confirmation threshold#35
Open
Ignacio-87 wants to merge 14 commits intodevfrom
Open
feat: Implement transaction status tracking with mempool detection and confirmation threshold#35Ignacio-87 wants to merge 14 commits intodevfrom
Ignacio-87 wants to merge 14 commits intodevfrom
Conversation
Update reorg detection to mark invalidated blocks as orphan
e119e2c to
6b45ec2
Compare
…ted types Also ajust param when calling mark_following_blocks_as_orphan
Replace unwrap() calls with proper error handling: - Add MissingTransactionData and MissingBlockInfo error variants - Replace tx_id() with tx_id_or_error() returning Result - Add tx_or_err() and block_info_or_err() helper methods This makes the code more robust by avoiding panics and providing descriptive error messages when transaction or block data is missing.
jonasmartin
reviewed
Feb 19, 2026
src/types.rs
Outdated
| pub block_info: Option<FullBlock>, | ||
| pub confirmations: u32, | ||
| pub status: TransactionBlockchainStatus, | ||
| pub confirmation_threshold: u32, |
Contributor
There was a problem hiding this comment.
There are serveral changes to be able to suppor is_finalized() that could be kept as it was before is_finaled(&self, confirmation_threshold: u32)
The value is being sent to the indexer to came back and finally being used just by the coordinator.
I think it's better to remove the threshold from here and make the function get the trheshold as parameter
Collaborator
Author
There was a problem hiding this comment.
Join confirmation_threshold with max_monitoring_confirmations and pass value as a param in is_finalized method
Remove confirmation_threshold as a stored field and pass it as parameter instead: - Remove confirmation_threshold from IndexerSettings config - Remove confirmation_threshold field from TransactionStatus - Remove confirmation_threshold field from IndexerStore - Change is_finalized() to accept max_monitoring_confirmations as parameter - Update all IndexerStore::new() calls to remove threshold parameter - Remove DEFAULT_CONFIRMATION_THRESHOLD constant This refactoring makes the code more flexible by allowing the confirmation threshold to be passed dynamically when checking if a transaction is finalized, rather than storing it in each TransactionStatus instance.
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.
Changes
Add transaction status tracking with mempool support and confirmation threshold
Implement transaction status tracking, allowing users to determine the current state of transactions in the blockchain.
InMempool,NotFoundis_finalized(),is_confirmed(),is_orphan()Fix Change