wallet: reject input_weights for outpoints not in transaction #34947

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:2026-03-weight_inputs changing 2 files +21 −1
  1. instagibbs commented at 11:31 pm on March 28, 2026: member

    fundrawtransaction, send, and walletcreatefundedpsbt accept an input_weights parameter that sets the weight for transaction inputs. SetInputWeight uses map::operator[] which silently creates entries in the coin control selection set for outpoints not in the transaction, causing unintended UTXOs to be spent.

    Validate that each input_weights entry corresponds to an actual input in the transaction before setting the weight.

  2. wallet: reject input_weights for outpoints not in transaction
    fundrawtransaction, send, and walletcreatefundedpsbt accept an
    input_weights parameter that sets the weight for transaction inputs.
    SetInputWeight uses map::operator[] which silently creates entries
    in the coin control selection set for outpoints not in the
    transaction, causing unintended UTXOs to be spent.
    
    Validate that each input_weights entry corresponds to an actual
    input in the transaction before setting the weight.
    3ded1e5bfb
  3. DrahtBot added the label Wallet on Mar 28, 2026
  4. DrahtBot commented at 11:31 pm on March 28, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  5. instagibbs closed this on Mar 28, 2026


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-31 12:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me