Revert "fix(transaction): get_out_point reverses tx hash (#9)" - #13
Merged
Conversation
This reverts commit 6092d58.
antouhou
approved these changes
Jan 4, 2023
romchornyi
pushed a commit
that referenced
this pull request
Aug 13, 2026
Three findings, one design gap: the sweep was attached to *account* processing, but "a competing spend just became provably dead" is a wallet-wide fact the moment any account observes a final spend. **#8 — the sweep never ran when the winner looked irrelevant.** `check_core_transaction` returns before touching any account, and relevance is computed from matching outputs and from inputs still in `utxos` — but a recorded loser already removed the shared input. So a winner that spends our coin and pays only external addresses matches nothing, and the loser stayed credited. Worse, as trusted self-send change it counts as *confirmed* and is spendable. The sweep now runs before that gate, next to `record_observed_spends`, which is unconditional for the same reason. **#13 — a loser in a sibling account survived.** The per-account sweep only visited `result.affected_accounts`, i.e. the winner's. Pooled funding routinely puts the loser's change elsewhere — the shape this PR's own commits call normal for asset locks. `ManagedWalletInfo:: sweep_conflicts` now asks every funds account. **#9 — the IS-lock sweep was dead code.** The live pipeline reaches `process_instant_send_lock` → `mark_instant_send_utxos`, which marks UTXOs and rewrites context and had no sweep at all; the branch I had added in `check_core_transaction` is only reachable on a first sighting that already carries the lock. The sweep now hangs off `mark_instant_send_utxos`, and the superseded per-account entry point is gone. Both new tests were confirmed to fail with the wallet-level sweep disabled. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
This reverts commit 6092d58.