Review report

bitcoin/bitcoin: PR #36344

2 suggestions

Optional improvements

Link

[suggestion] · sendall help omits the input-uniqueness rule

sendall now explicitly rejects repeated outpoints, but its inputs help does not document that restriction.

Location: src/wallet/rpc/spend.cpp:1478 (head).

Details and suggested fix

The new check correctly rejects a repeated outpoint with Invalid parameter, duplicated input: <txid>:<vout>. However, the inputs description only documents using exactly the specified inputs and incompatibility with send_max, minconf, and maxconf. Callers learn the uniqueness requirement from the error rather than the help. Add “Each input may only appear once.” to that description, matching how the recipients help documents address uniqueness. This only clarifies the implemented behavior.


Link

[suggestion] · Duplicate-input test does not distinguish outpoint equality

The new regression test uses identical input fields, so it would still pass if duplicate detection incorrectly compared whole inputs instead of outpoints.

Location: test/functional/wallet_sendall.py:258 (head).

Details and suggested fix

inputs=[utxo, utxo] constructs two identical CTxIn values. Since CTxIn::operator== also compares nSequence, a future whole-input comparison could satisfy the expected error and all wallet-state assertions while admitting the same outpoint with different sequences. That would double-count its value again and could add a consensus-invalid transaction to the wallet after successful signing with the default options. Add a second assertion using the same txid and vout with explicit sequence values of 1 and 2, expecting the same -8 duplicated-input error. AddInputs preserves those values and both pass the construction-time RBF guard. The current prevout-keyed check already rejects this variant; this suggestion strengthens regression coverage.


Coverage details