wallet: show real fee_reason strings in help #36432

Manually merged
jcastros merged 1 commit from wallet-fee-reason-help into master 2026-10-07 09:12:47 +00:00 AGit
jcastros commented 2026-10-04 04:18:31 +00:00 (Migrated from github.com)

The verbose help for sendtoaddress and sendmany paraphrased
fee_reason and left out "User Specified Fee". The strings the RPC
returns are the ones in StringForFeeReason.

Join that map for both help lines, the same way estimate_mode help
is built from FeeModeMap, so the list cannot drift again.

wallet_basic.py checks that an explicit fee_rate returns
"User Specified Fee" for sendtoaddress and sendmany.

The verbose help for sendtoaddress and sendmany paraphrased fee_reason and left out "User Specified Fee". The strings the RPC returns are the ones in StringForFeeReason. Join that map for both help lines, the same way estimate_mode help is built from FeeModeMap, so the list cannot drift again. wallet_basic.py checks that an explicit fee_rate returns "User Specified Fee" for sendtoaddress and sendmany.
DrahtBot commented 2026-10-04 04:18:40 +00:00 (Migrated from github.com)

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

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK maflcko, ismaelsadeeq, sedited

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36432 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36432.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36432#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [maflcko](https://github.com/bitcoin/bitcoin/pull/36432#pullrequestreview-5405134989), [ismaelsadeeq](https://github.com/bitcoin/bitcoin/pull/36432#pullrequestreview-5438173215), [sedited](https://github.com/bitcoin/bitcoin/pull/36432#pullrequestreview-5439163773) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

Base: 66776840beb558f7e84451c2c55457f0e06242f0
Head: 781d8dbd500d4f7b6577ed4b37d1d913c25052af

💡 Suggestion

Assert the fee-reason help text (src/wallet/rpc/spend.cpp:276, head)

The new wallet_basic.py assertions check returned fee_reason values, but they would still pass if this help description reverted to an incomplete paraphrase. rpc_help.py generates and writes help output without asserting its contents. Add help-output assertions for both sendtoaddress and sendmany that check the advertised fee-reason list, including at least “User Specified Fee.”

Review coverage was incomplete. The adversarial_glm review did not complete.

Full review report

<!-- forgejo-review-bot:bitcoin/bitcoin --> Base: `66776840beb558f7e84451c2c55457f0e06242f0` Head: `781d8dbd500d4f7b6577ed4b37d1d913c25052af` ##### 💡 Suggestion **Assert the fee-reason help text** (src/wallet/rpc/spend.cpp:276, head) The new `wallet_basic.py` assertions check returned `fee_reason` values, but they would still pass if this help description reverted to an incomplete paraphrase. `rpc_help.py` generates and writes help output without asserting its contents. Add help-output assertions for both `sendtoaddress` and `sendmany` that check the advertised fee-reason list, including at least “User Specified Fee.” Review coverage was incomplete. The adversarial_glm review did not complete. [Full review report](<https://review.fish.foo/traces/36432-781d8dbd500d4f7b6577ed4b37d1d913c25052af-371-1.html>)
maflcko (Migrated from github.com) reviewed 2026-10-04 08:55:15 +00:00
maflcko (Migrated from github.com) left a comment

lgtm ACK 781d8dbd50

lgtm ACK 781d8dbd500d4f7b6577ed4b37d1d913c25052af
maflcko (Migrated from github.com) commented 2026-10-04 08:54:13 +00:00
        txid_feeReason_specified_many = self.nodes[2].sendmany(amounts={address: 1}, fee_rate=5, verbose=True)

nit: Is this dummy needed or can it be dropped?

```suggestion txid_feeReason_specified_many = self.nodes[2].sendmany(amounts={address: 1}, fee_rate=5, verbose=True) ``` nit: Is this dummy needed or can it be dropped?
is9816998-byte (Migrated from github.com) reviewed 2026-10-04 09:13:54 +00:00
is9816998-byte (Migrated from github.com) commented 2026-10-04 09:13:54 +00:00

Nice back

Nice back
ismaelsadeeq (Migrated from github.com) approved these changes 2026-10-07 05:48:43 +00:00
ismaelsadeeq (Migrated from github.com) left a comment

Code review ACK 781d8dbd50

Thanks for the cleanup.

Code review ACK 781d8dbd500d4f7b6577ed4b37d1d913c25052af Thanks for the cleanup.
sedited (Migrated from github.com) approved these changes 2026-10-07 07:44:08 +00:00
sedited (Migrated from github.com) left a comment
ACK 781d8dbd500d4f7b6577ed4b37d1d913c25052af
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36432
No description provided.