fix: we should await mark utxos with proposal id to prevent a race condition#250
Merged
Merged
Conversation
r4mmer
approved these changes
Apr 15, 2025
pedroferreira1
approved these changes
Apr 15, 2025
r4mmer
added a commit
that referenced
this pull request
Jul 3, 2025
…-lib-v2.1.1 * origin/master: chore: bumped to v1.9.0 (#259) chore: nano-testnet-hackaton (#243) fix: address invalid parameter (#235) chore: added htr token seed (#256) fix: invalid assert in release tx proposal utxos (#251) fix: we should await mark utxos with proposal id to prevent a race condition (#250) Merge pull request #248 from HathorNetwork/feat/version-camel-case fix: v1.8.2-rc.3 qa issues (#246) fix: firebase env variables should be optional (#245) chore: remove error handler middleware from authorization lambda (#242) feat: version data validation (#241) fix: Mainnet release script (#203)
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.
Motivation
We should wait until the utxos are marked as spent before returning a success in the tx proposal creation. This was most likely creating a race condition where we were attempting to clear the tx proposal from utxos but they weren't even marked yet and another potential issue where the lambda would kill the connection before the query even runs.
Acceptance Criteria
utxomarking in thecreateTxProposallambdaChecklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged