You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #16383: rpcwallet: default include_watchonly to true for watchonly wallets
72eaab0 tests: functional watch-only wallet tests (William Casarin)
72ffbdc doc: add release note for include_watchonly default changes (William Casarin)
003a3c7 rpcwallet: document include_watchonly default for watchonly wallets (William Casarin)
a50d9e6 rpcwallet: default include_watchonly to true for watchonly wallets (William Casarin)
Pull request description:
Right now it's a bit annoying to deal with watchonly wallets, many rpc commands have an `include_watchonly` argument that needs to be explicitly set.
Wallets created with `createwallet` can have a `disable_private_keys` parameter, for those wallets we already know that they are watchonly, so there's no reason to have to explicitly ask for it for every command. Instead we check this wallet flag when the `include_watchonly` parameter isn't set.
ACKs for top commit:
achow101:
Code review ACK 72eaab0
Sjors:
ACK 72eaab0
promag:
ACK 72eaab0, code review only, didn't look closely to the test.
kallewoof:
ACK 72eaab0
fanquake:
ACK 72eaab0 - I've looked over the changes, they make sense to me. Compiled and ran the tests etc.
Tree-SHA512: d3646b55e97f386594d7efc994f0712f3888475c6a5dc7f131ac9f8c49bf5d4677182b88f42b34152abe1ad101ecadd152b4c20e9d3c1267190db36f77ab8bd7
{"dummy", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "Remains for backward compatibility. Must be excluded or set to \"*\"."},
712
729
{"minconf", RPCArg::Type::NUM, /* default */"0", "Only include transactions confirmed at least this many times."},
713
-
{"include_watchonly", RPCArg::Type::BOOL, /* default */"false", "Also include balance in watch-only addresses (see 'importaddress')"},
730
+
{"include_watchonly", RPCArg::Type::BOOL, /* default */"true for watch-only wallets, otherwise false", "Also include balance in watch-only addresses (see 'importaddress')"},
714
731
{"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."},
{"minconf", RPCArg::Type::NUM, /* default */"1", "The minimum number of confirmations before payments are included."},
1171
1186
{"include_empty", RPCArg::Type::BOOL, /* default */"false", "Whether to include addresses that haven't received any payments."},
1172
-
{"include_watchonly", RPCArg::Type::BOOL, /* default */"false", "Whether to include watch-only addresses (see 'importaddress')."},
1187
+
{"include_watchonly", RPCArg::Type::BOOL, /* default */"true for watch-only wallets, otherwise false", "Whether to include watch-only addresses (see 'importaddress')"},
1173
1188
{"address_filter", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "If present, only return information on this address."},
{"minconf", RPCArg::Type::NUM, /* default */"1", "The minimum number of confirmations before payments are included."},
1222
1237
{"include_empty", RPCArg::Type::BOOL, /* default */"false", "Whether to include labels that haven't received any payments."},
1223
-
{"include_watchonly", RPCArg::Type::BOOL, /* default */"false", "Whether to include watch-only addresses (see 'importaddress')."},
1238
+
{"include_watchonly", RPCArg::Type::BOOL, /* default */"true for watch-only wallets, otherwise false", "Whether to include watch-only addresses (see 'importaddress')"},
{"blockhash", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "If set, the block hash to list transactions since, otherwise list all transactions."},
1494
1510
{"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"},
1495
-
{"include_watchonly", RPCArg::Type::BOOL, /* default */"false", "Include transactions to watch-only addresses (see 'importaddress')"},
1511
+
{"include_watchonly", RPCArg::Type::BOOL, /* default */"true for watch-only wallets, otherwise false", "Include transactions to watch-only addresses (see 'importaddress')"},
1496
1512
{"include_removed", RPCArg::Type::BOOL, /* default */"true", "Show transactions that were removed due to a reorg in the \"removed\" array\n"
"\nGet detailed information about in-wallet transaction <txid>\n",
1633
1649
{
1634
1650
{"txid", RPCArg::Type::STR, RPCArg::Optional::NO, "The transaction id"},
1635
-
{"include_watchonly", RPCArg::Type::BOOL, /* default */"false", "Whether to include watch-only addresses in balance calculation and details[]"},
1651
+
{"include_watchonly", RPCArg::Type::BOOL, /* default */"true for watch-only wallets, otherwise false", "Whether to include watch-only addresses in balance calculation and details[]"},
{"changeAddress", RPCArg::Type::STR, /* default */"pool address", "The bitcoin address to receive the change"},
3103
3122
{"changePosition", RPCArg::Type::NUM, /* default */"random", "The index of the change output"},
3104
3123
{"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\"."},
3105
-
{"includeWatching", RPCArg::Type::BOOL, /* default */"false", "Also select inputs which are watch only"},
3124
+
{"includeWatching", RPCArg::Type::BOOL, /* default */"true for watch-only wallets, otherwise false", "Also select inputs which are watch only"},
{"changeAddress", RPCArg::Type::STR_HEX, /* default */"pool address", "The bitcoin address to receive the change"},
4048
4067
{"changePosition", RPCArg::Type::NUM, /* default */"random", "The index of the change output"},
4049
4068
{"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\"."},
4050
-
{"includeWatching", RPCArg::Type::BOOL, /* default */"false", "Also select inputs which are watch only"},
4069
+
{"includeWatching", RPCArg::Type::BOOL, /* default */"true for watch-only wallets, otherwise false", "Also select inputs which are watch only"},
0 commit comments