doc: Clarify includeWatching for fundrawtransaction #16397

pull stevenroose wants to merge 1 commits into bitcoin:master from stevenroose:fundraw-includewatching changing 1 files +3 −1
  1. stevenroose commented at 2:49 PM on July 16, 2019: contributor

    Might be sufficient to solve #16396, #7879 and #14405.

  2. fanquake added the label Docs on Jul 16, 2019
  3. fanquake added the label RPC/REST/ZMQ on Jul 16, 2019
  4. in src/wallet/rpcwallet.cpp:3150 in 7ea8c8a8b1 outdated
    3145 | @@ -3146,7 +3146,8 @@ static UniValue fundrawtransaction(const JSONRPCRequest& request)
    3146 |                              {"changeAddress", RPCArg::Type::STR, /* default */ "pool address", "The bitcoin address to receive the change"},
    3147 |                              {"changePosition", RPCArg::Type::NUM, /* default */ "random", "The index of the change output"},
    3148 |                              {"change_type", RPCArg::Type::STR, /* default */ "set by -changetype", "The output type to use. Only valid if changeAddress is not specified. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\"."},
    3149 | -                            {"includeWatching", RPCArg::Type::BOOL, /* default */ "false", "Also select inputs which are watch only"},
    3150 | +                            {"includeWatching", RPCArg::Type::BOOL, /* default */ "false", "Also select inputs which are watch only.\n"
    3151 | +                            "                              Only solvable inputs can be used."},
    


    MarcoFalke commented at 3:11 PM on July 16, 2019:

    style-nit: Whitspace should be trimmed from strings later anyway:

                                                              "Only solvable inputs can be used."},
    
  5. jonasschnelli commented at 3:41 PM on July 16, 2019: contributor

    I think this change is helpful. Though giving a short instruction how one can import a solveble-watch-only would probably be even better. An alternative would be returning a more precise error (rather than just "insufficient funds").

  6. DrahtBot commented at 11:36 PM on July 18, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  7. stevenroose force-pushed on Jul 19, 2019
  8. stevenroose commented at 10:00 AM on July 19, 2019: contributor

    Pushed an update explaining how to get solvable inputs.

  9. jb55 commented at 12:54 PM on July 19, 2019: member

    Concept ACK, although I think a better error message is the right approach here. Insufficient funds is a bit vague.

    I believe the same applies to walletcreatefundedpsbt?

  10. in src/wallet/rpcwallet.cpp:3151 in 93184827c3 outdated
    3145 | @@ -3146,7 +3146,9 @@ static UniValue fundrawtransaction(const JSONRPCRequest& request)
    3146 |                              {"changeAddress", RPCArg::Type::STR, /* default */ "pool address", "The bitcoin address to receive the change"},
    3147 |                              {"changePosition", RPCArg::Type::NUM, /* default */ "random", "The index of the change output"},
    3148 |                              {"change_type", RPCArg::Type::STR, /* default */ "set by -changetype", "The output type to use. Only valid if changeAddress is not specified. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\"."},
    3149 | -                            {"includeWatching", RPCArg::Type::BOOL, /* default */ "false", "Also select inputs which are watch only"},
    3150 | +                            {"includeWatching", RPCArg::Type::BOOL, /* default */ "false", "Also select inputs which are watch only. Only solvable inputs can be used.\n"
    3151 | +                                                          "Watch-only destinations are solvable if the public key was imported, \n"
    3152 | +                                                          "f.e. with 'importpubkey' or 'importmulti' with the 'pubkeys' or 'desc' field."},
    


    meshcollider commented at 1:16 PM on July 29, 2019:

    nit: f.e. -> e.g.


    stevenroose commented at 4:27 PM on July 29, 2019:

    fixed

  11. stevenroose force-pushed on Jul 29, 2019
  12. DrahtBot added the label Needs rebase on Aug 16, 2019
  13. stevenroose force-pushed on Aug 16, 2019
  14. DrahtBot removed the label Needs rebase on Aug 16, 2019
  15. meshcollider commented at 3:46 AM on September 10, 2019: contributor

    The "public key" solvability is really only true for single-key destinations like P2PK, P2PKH and P2WPKH. For script-hash type outputs, you need to know the script, etc.

  16. MarcoFalke renamed this:
    Clarify includeWatching for fundrawtransaction
    doc: Clarify includeWatching for fundrawtransaction
    on Sep 10, 2019
  17. MarcoFalke added this to the milestone 0.19.0 on Sep 10, 2019
  18. stevenroose commented at 4:42 PM on September 13, 2019: contributor

    The "public key" solvability is really only true for single-key destinations like P2PK, P2PKH and P2WPKH. For script-hash type outputs, you need to know the script, etc.

    I'll add and/or scriptPubkey and rebase.

  19. stevenroose force-pushed on Sep 13, 2019
  20. Clarify includeWatching for fundrawtransaction 80031045fc
  21. fanquake requested review from meshcollider on Sep 26, 2019
  22. meshcollider commented at 12:24 PM on September 26, 2019: contributor

    I'm not sure if the term "output script" is standard, solvability for P2SH for example requires the wallet to know the embedded script not the scriptPubKey. But this is okay I guess, I don't want to bikeshed when the meaning is clear.

  23. stevenroose commented at 11:49 AM on September 27, 2019: contributor

    @meshcollider I think the main purpose of the second part of the explanation is that there are other requirements for solvability that include pubkeys and scripts. I'm not sure how wide-spread it is, but I generally use input script and output script as synonyms for resp. scriptSig's and scriptPubKey's. And sure in the p2sh case there's kinda two output scripts going on of which one is just a hashed version of the other.

  24. Sjors commented at 5:58 PM on September 27, 2019: member

    ACK 8003104. This will always be confusing, but at least it gives a bunch more clues for the user to google. <img width="1094" alt="Schermafbeelding 2019-09-27 om 19 57 16" src="https://user-images.githubusercontent.com/10217/65791031-2cba6080-e161-11e9-8664-631c16d5a881.png">

  25. laanwj referenced this in commit 79aeed8e76 on Sep 30, 2019
  26. laanwj merged this on Sep 30, 2019
  27. laanwj closed this on Sep 30, 2019

  28. sidhujag referenced this in commit 87f572d383 on Oct 2, 2019
  29. jasonbcox referenced this in commit b942902439 on Sep 7, 2020
  30. vijaydasmp referenced this in commit de90806b39 on Oct 29, 2021
  31. vijaydasmp referenced this in commit 109c46514d on Oct 29, 2021
  32. humbleDasher referenced this in commit 3d642e293b on Dec 5, 2021
  33. DrahtBot locked this on Dec 16, 2021

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-04-13 15:14 UTC

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