Repository navigation
fix(utils): wait for txins in check_txins_spent - #3743
Merged
Merged
Conversation
Previously `check_txins_spent` waited a fixed 2 blocks and assumed the transaction was included by then. Now it checks right away and if some txins are still unspent, waits `confirm_blocks` new blocks and checks again, up to `attempts` times, like `submit_tx` does (without resubmitting). It also accepts `TxId#TxIx` strings. Use it in places that submitted with `submit_tx_bare` and then waited a fixed number of blocks: * collateral tests wait until the collateral is spent, then report `consensus_973` on timeout * node upgrade test waits for the inputs read from the tx file * `defragment_utxos` waits for one txin per submitted tx, which keeps the query within the command line length limit
mkoura
requested
a balanced review from Copilot
and removed request for
saratomaz
October 6, 2026 12:48
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.
Previously
check_txins_spentwaited a fixed 2 blocks and assumed the transaction was included by then. Now it checks right away and if some txins are still unspent, waitsconfirm_blocksnew blocks and checks again, up toattemptstimes, likesubmit_txdoes (without resubmitting). It also acceptsTxId#TxIxstrings.Use it in places that submitted with
submit_tx_bareand then waited a fixed number of blocks:consensus_973on timeoutdefragment_utxoswaits for one txin per submitted tx, which keeps the query within the command line length limit