chore: v0.24-dev backports part 3 - #994
Merged
Merged
Conversation
Co-authored-by: Ivan Shumkov <ivan@shumkov.ru>
Co-authored-by: Anton Suprunchuk <anton.suprunchuk@gmail.com>
markin-io
marked this pull request as ready for review
April 28, 2023 12:44
QuantumExplorer
approved these changes
Apr 28, 2023
5 tasks
romchornyi
pushed a commit
that referenced
this pull request
Sep 3, 2026
core_wallet_signed_payment_finalize called plain finalize_transaction, so a host that set the restriction via core_wallet_tx_builder_use_only_added_inputs and then submitted through the deferred (BIP70/BIP270) path had it accepted at the FFI boundary and silently discarded at the finalizer: the funding account's whole UTXO set was offered to selection after all, which is exactly the too-many-inputs failure this branch exists to fix. Thread reservation_only through, read off the reclaimed box rather than through the consumed raw pointer, and say in the setter's doc that both finalizers honour it. Add the workspace-level regression test the crossing lacked. key-wallet #994 covers add_funding_reservation_only on its own side, but the flag travels an FFI struct field, a finalizer bool and a key-wallet call, and nothing here failed if it were dropped anywhere along that path. The new case funds an account with two UTXOs, seeds one, and asserts both that the build spends only the seeded input and that a payment only the pair could cover FAILS - the half that actually proves the second UTXO was never a candidate. Verified against a mutant (add_funding_reservation_only -> add_funding): the test goes red. Also correct the offered_accounts comment, which described a list that under the flag holds accounts doing reservation bookkeeping and offering nothing.
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.
Issue being fixed or feature implemented
What was done?
Skipped js-drive PRs
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only