rpc: document maxconf default value in wallet RPCs #35137

pull GerardoTaboada wants to merge 1 commits into bitcoin:master from GerardoTaboada:wallet/document-maxconf-default changing 1 files +4 −4
  1. GerardoTaboada commented at 2:59 AM on April 22, 2026: none

    fundrawtransaction, send, sendall, and walletcreatefundedpsbt all document maxconf as Optional::OMITTED, while the sibling parameter minconf explicitly documents its default of 0. The actual default for maxconf is 9999999 (DEFAULT_MAX_DEPTH in src/wallet/coincontrol.h).

    listunspent already documents this correctly:

    {"maxconf", RPCArg::Type::NUM, RPCArg::Default{9999999}, "The maximum confirmations to filter"},
    

    This PR applies the same pattern to the four affected RPCs for consistency.

  2. DrahtBot added the label RPC/REST/ZMQ on Apr 22, 2026
  3. DrahtBot commented at 2:59 AM on April 22, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. sedited commented at 6:40 AM on April 22, 2026: contributor

    Please drop the unrelated first commit.

  5. rpc: document maxconf default value in wallet RPCs
    fundrawtransaction, send, sendall, and walletcreatefundedpsbt all had
    maxconf documented as Optional::OMITTED, while the sibling parameter
    minconf explicitly documented its default of 0. The actual default for
    maxconf is 9999999 (DEFAULT_MAX_DEPTH from coincontrol.h), which is
    already documented correctly in listunspent. Make all four RPCs
    consistent with listunspent by using RPCArg::Default{9999999}.
    90dc47fb77
  6. GerardoTaboada force-pushed on Apr 22, 2026
  7. GerardoTaboada commented at 2:48 PM on April 22, 2026: none

    Done, removed the unrelated commit via rebase.

  8. dergoegge commented at 1:31 PM on April 27, 2026: member

    The bottleneck in this project has always been review and testing, not writing code. Development here is intentionally conservative and slow, and reviewer attention is the scarcest resource we have. LLMs have made this worse, anyone can now prompt them and post their output as PRs. There is an infinite amount plausible looking "improvements" for LLMs to suggest and work on.

    Unless we fully trust LLMs to both write and review code, humans still have to spend time understanding the proposed changes, which incurs a non-zero cost for every opened PR.

    I understand that contributing to this project can be intimidating, and using LLMs may seem tempting, but it really creates more issues for this project than it solves. The best way to help this project, is to review and test changes. You can use LLMs for this, but you shouldn't solely rely on them, or just post their output.

    I'm not asking you to close this PR. I am asking you to reconsider whether it's something you genuinely think the project should pursue, independent of what your LLM suggested.

  9. GerardoTaboada commented at 3:21 PM on April 27, 2026: none

    Fair point, and I'll be direct: I used an LLM to help identify this. That said, I reviewed the change myself and understand what it does — minconf documents its default of 0 via RPCArg::Default{0}, while maxconf uses Optional::OMITTED despite having a concrete default (DEFAULT_MAX_DEPTH = 9999999 in src/wallet/coincontrol.h). listunspent already uses RPCArg::Default{9999999} for this reason. The four affected RPCs are inconsistent with it.

    The fix is 4 lines applying an existing pattern. I think it's worth merging for API documentation consistency, but I respect that you're in a better position to weigh that against review cost. Happy to close if you'd prefer not to spend time on it.


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-05-13 00:13 UTC

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