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-
stevenroose commented at 2:49 PM on July 16, 2019: contributor
- fanquake added the label Docs on Jul 16, 2019
- fanquake added the label RPC/REST/ZMQ on Jul 16, 2019
-
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."},jonasschnelli commented at 3:41 PM on July 16, 2019: contributorI 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").
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.
stevenroose force-pushed on Jul 19, 2019stevenroose commented at 10:00 AM on July 19, 2019: contributorPushed an update explaining how to get solvable inputs.
jb55 commented at 12:54 PM on July 19, 2019: memberConcept 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?
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
stevenroose force-pushed on Jul 29, 2019DrahtBot added the label Needs rebase on Aug 16, 2019stevenroose force-pushed on Aug 16, 2019DrahtBot removed the label Needs rebase on Aug 16, 2019meshcollider commented at 3:46 AM on September 10, 2019: contributorThe "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.
MarcoFalke renamed this:Clarify includeWatching for fundrawtransaction
doc: Clarify includeWatching for fundrawtransaction
on Sep 10, 2019MarcoFalke added this to the milestone 0.19.0 on Sep 10, 2019stevenroose commented at 4:42 PM on September 13, 2019: contributorThe "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 scriptPubkeyand rebase.stevenroose force-pushed on Sep 13, 2019Clarify includeWatching for fundrawtransaction 80031045fcfanquake requested review from meshcollider on Sep 26, 2019meshcollider commented at 12:24 PM on September 26, 2019: contributorI'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.
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.
Sjors commented at 5:58 PM on September 27, 2019: memberACK 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">
laanwj referenced this in commit 79aeed8e76 on Sep 30, 2019laanwj merged this on Sep 30, 2019laanwj closed this on Sep 30, 2019sidhujag referenced this in commit 87f572d383 on Oct 2, 2019jasonbcox referenced this in commit b942902439 on Sep 7, 2020vijaydasmp referenced this in commit de90806b39 on Oct 29, 2021vijaydasmp referenced this in commit 109c46514d on Oct 29, 2021humbleDasher referenced this in commit 3d642e293b on Dec 5, 2021DrahtBot locked this on Dec 16, 2021LabelsMilestone
0.19.0
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
More mirrored repositories can be found on mirror.b10c.me