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 #16239: wallet/rpc: follow-up clean-up/fixes to avoid_reuse
71d0344 docs: release note wording (Karl-Johan Alm)
3d2ff37 wallet/rpc: use static help text (Karl-Johan Alm)
53c3c1e wallet/rpc/getbalances: add entry for 'mine.used' balance in results (Karl-Johan Alm)
Pull request description:
This addresses a few remaining issues pointed out in #13756:
* First commit addresses bitcoin/bitcoin#13756 (comment)
* Second commit addresses bitcoin/bitcoin#13756 (comment)
Ping jnewbery and achow101 as they pointed out these issues.
ACKs for commit 71d034:
jnewbery:
ACK 71d0344
meshcollider:
re-utACK bitcoin/bitcoin@71d0344
Tree-SHA512: 5e28822af0574ad07dbbed21aa2fe7866bf5770b4c0a1c150ad0da8af3152bcfb7170330a7497fa500326c594740ecf63733cf58325821e2811d7b911d5783a0
{"avoid_reuse", RPCArg::Type::BOOL, /* default */pwallet->IsWalletFlagSet(WALLET_FLAG_AVOID_REUSE) ? "true" : "unavailable", "Avoid spending from dirty addresses; addresses are considered\n"
386
+
{"avoid_reuse", RPCArg::Type::BOOL, /* default */"true", "(only available if avoid_reuse wallet flag is set) Avoid spending from dirty addresses; addresses are considered\n"
387
387
" dirty if they have previously been used in a transaction."},
{"dummy", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "Remains for backward compatibility. Must be excluded or set to \"*\"."},
744
744
{"minconf", RPCArg::Type::NUM, /* default */"0", "Only include transactions confirmed at least this many times."},
745
745
{"include_watchonly", RPCArg::Type::BOOL, /* default */"false", "Also include balance in watch-only addresses (see 'importaddress')"},
746
-
{"avoid_reuse", RPCArg::Type::BOOL, /* default */pwallet->IsWalletFlagSet(WALLET_FLAG_AVOID_REUSE) ? "true" : "unavailable", "Do not include balance in dirty outputs; addresses are considered dirty if they have previously been used in a transaction."},
746
+
{"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."},
747
747
},
748
748
RPCResult{
749
749
"amount (numeric) The total amount in " + CURRENCY_UNIT + " received for this wallet.\n"
"\"trusted\": xxx (numeric) trusted balance (outputs created by the wallet or confirmed outputs)\n"
2410
2410
"\"untrusted_pending\": xxx (numeric) untrusted pending balance (outputs created by others that are in the mempool)\n"
2411
2411
"\"immature\": xxx (numeric) balance from immature coinbase outputs\n"
2412
+
"\"used\": xxx (numeric) (only present if avoid_reuse is set) balance from coins sent to addresses that were previously spent from (potentially privacy violating)\n"
2412
2413
" },\n"
2413
2414
"\"watchonly\": { (object) watchonly balances (not present if wallet does not watch anything)\n"
2414
2415
"\"trusted\": xxx (numeric) trusted balance (outputs created by the wallet or confirmed outputs)\n"
"\"witnessScript\" : \"script\" (string) witnessScript if the scriptPubKey is P2WSH or P2SH-P2WSH\n"
2927
2931
"\"spendable\" : xxx, (bool) Whether we have the private keys to spend this output\n"
2928
2932
"\"solvable\" : xxx, (bool) Whether we know how to spend this output, ignoring the lack of keys\n"
2929
-
+ (avoid_reuse ?
2930
-
"\"reused\" : xxx, (bool) Whether this output is reused/dirty (sent to an address that was previously spent from)\n" :
2931
-
"") +
2933
+
"\"reused\" : xxx, (bool) (only present if avoid_reuse is set) Whether this output is reused/dirty (sent to an address that was previously spent from)\n"
2932
2934
"\"desc\" : xxx, (string, only when solvable) A descriptor for spending this output\n"
2933
2935
"\"safe\" : xxx (bool) Whether this output is considered safe to spend. Unconfirmed transactions\n"
2934
2936
" from outside keys and unconfirmed replacement transactions are considered unsafe\n"
0 commit comments