Skip to content

Commit 003a3c7

Browse files
committed
rpcwallet: document include_watchonly default for watchonly wallets
Signed-off-by: William Casarin <[email protected]>
1 parent a50d9e6 commit 003a3c7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ static UniValue getbalance(const JSONRPCRequest& request)
732732
{
733733
{"dummy", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "Remains for backward compatibility. Must be excluded or set to \"*\"."},
734734
{"minconf", RPCArg::Type::NUM, /* default */ "0", "Only include transactions confirmed at least this many times."},
735-
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "false", "Also include balance in watch-only addresses (see 'importaddress')"},
735+
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "true for watch-only wallets, otherwise false", "Also include balance in watch-only addresses (see 'importaddress')"},
736736
{"avoid_reuse", RPCArg::Type::BOOL, /* default */ "true", "(only available if avoid_reuse wallet flag is set) Do not include balance in dirty outputs; addresses are considered dirty if they have previously been used in a transaction."},
737737
},
738738
RPCResult{
@@ -1194,7 +1194,7 @@ static UniValue listreceivedbyaddress(const JSONRPCRequest& request)
11941194
{
11951195
{"minconf", RPCArg::Type::NUM, /* default */ "1", "The minimum number of confirmations before payments are included."},
11961196
{"include_empty", RPCArg::Type::BOOL, /* default */ "false", "Whether to include addresses that haven't received any payments."},
1197-
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "false", "Whether to include watch-only addresses (see 'importaddress')."},
1197+
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "true for watch-only wallets, otherwise false", "Whether to include watch-only addresses (see 'importaddress')"},
11981198
{"address_filter", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "If present, only return information on this address."},
11991199
},
12001200
RPCResult{
@@ -1245,7 +1245,7 @@ static UniValue listreceivedbylabel(const JSONRPCRequest& request)
12451245
{
12461246
{"minconf", RPCArg::Type::NUM, /* default */ "1", "The minimum number of confirmations before payments are included."},
12471247
{"include_empty", RPCArg::Type::BOOL, /* default */ "false", "Whether to include labels that haven't received any payments."},
1248-
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "false", "Whether to include watch-only addresses (see 'importaddress')."},
1248+
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "true for watch-only wallets, otherwise false", "Whether to include watch-only addresses (see 'importaddress')"},
12491249
},
12501250
RPCResult{
12511251
"[\n"
@@ -1386,7 +1386,7 @@ UniValue listtransactions(const JSONRPCRequest& request)
13861386
" with the specified label, or \"*\" to disable filtering and return all transactions."},
13871387
{"count", RPCArg::Type::NUM, /* default */ "10", "The number of transactions to return"},
13881388
{"skip", RPCArg::Type::NUM, /* default */ "0", "The number of transactions to skip"},
1389-
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "false", "Include transactions to watch-only addresses (see 'importaddress')"},
1389+
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "true for watch-only wallets, otherwise false", "Include transactions to watch-only addresses (see 'importaddress')"},
13901390
},
13911391
RPCResult{
13921392
"[\n"
@@ -1518,7 +1518,7 @@ static UniValue listsinceblock(const JSONRPCRequest& request)
15181518
{
15191519
{"blockhash", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "If set, the block hash to list transactions since, otherwise list all transactions."},
15201520
{"target_confirmations", RPCArg::Type::NUM, /* default */ "1", "Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value"},
1521-
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "false", "Include transactions to watch-only addresses (see 'importaddress')"},
1521+
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "true for watch-only wallets, otherwise false", "Include transactions to watch-only addresses (see 'importaddress')"},
15221522
{"include_removed", RPCArg::Type::BOOL, /* default */ "true", "Show transactions that were removed due to a reorg in the \"removed\" array\n"
15231523
" (not guaranteed to work on pruned nodes)"},
15241524
},
@@ -1658,7 +1658,7 @@ static UniValue gettransaction(const JSONRPCRequest& request)
16581658
"\nGet detailed information about in-wallet transaction <txid>\n",
16591659
{
16601660
{"txid", RPCArg::Type::STR, RPCArg::Optional::NO, "The transaction id"},
1661-
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "false", "Whether to include watch-only addresses in balance calculation and details[]"},
1661+
{"include_watchonly", RPCArg::Type::BOOL, /* default */ "true for watch-only wallets, otherwise false", "Whether to include watch-only addresses in balance calculation and details[]"},
16621662
},
16631663
RPCResult{
16641664
"{\n"
@@ -3120,7 +3120,7 @@ static UniValue fundrawtransaction(const JSONRPCRequest& request)
31203120
{"changeAddress", RPCArg::Type::STR, /* default */ "pool address", "The bitcoin address to receive the change"},
31213121
{"changePosition", RPCArg::Type::NUM, /* default */ "random", "The index of the change output"},
31223122
{"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\"."},
3123-
{"includeWatching", RPCArg::Type::BOOL, /* default */ "false", "Also select inputs which are watch only"},
3123+
{"includeWatching", RPCArg::Type::BOOL, /* default */ "true for watch-only wallets, otherwise false", "Also select inputs which are watch only"},
31243124
{"lockUnspents", RPCArg::Type::BOOL, /* default */ "false", "Lock selected unspent outputs"},
31253125
{"feeRate", RPCArg::Type::AMOUNT, /* default */ "not set: makes wallet determine the fee", "Set a specific fee rate in " + CURRENCY_UNIT + "/kB"},
31263126
{"subtractFeeFromOutputs", RPCArg::Type::ARR, /* default */ "empty array", "A json array of integers.\n"
@@ -4062,7 +4062,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
40624062
{"changeAddress", RPCArg::Type::STR_HEX, /* default */ "pool address", "The bitcoin address to receive the change"},
40634063
{"changePosition", RPCArg::Type::NUM, /* default */ "random", "The index of the change output"},
40644064
{"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\"."},
4065-
{"includeWatching", RPCArg::Type::BOOL, /* default */ "false", "Also select inputs which are watch only"},
4065+
{"includeWatching", RPCArg::Type::BOOL, /* default */ "true for watch-only wallets, otherwise false", "Also select inputs which are watch only"},
40664066
{"lockUnspents", RPCArg::Type::BOOL, /* default */ "false", "Lock selected unspent outputs"},
40674067
{"feeRate", RPCArg::Type::AMOUNT, /* default */ "not set: makes wallet determine the fee", "Set a specific fee rate in " + CURRENCY_UNIT + "/kB"},
40684068
{"subtractFeeFromOutputs", RPCArg::Type::ARR, /* default */ "empty array", "A json array of integers.\n"

0 commit comments

Comments
 (0)