diff --git a/qa/rpc-tests/wallet_z_sendmany.py b/qa/rpc-tests/wallet_z_sendmany.py index f9c9eacf6..e033d13f7 100755 --- a/qa/rpc-tests/wallet_z_sendmany.py +++ b/qa/rpc-tests/wallet_z_sendmany.py @@ -317,7 +317,7 @@ class WalletZSendmanyTest(BitcoinTestFramework): # If we try to send 3 ZEC from n1ua0, it will fail with too-few funds. recipients = [{"address":n0ua0, "amount":3}] - linked_addrs_msg = 'Insufficient funds: have 2.00, need 3.00 (This transaction may require selecting transparent coins that were sent to multiple Unified Addresses, which is not enabled by default because it would create a public link between the transparent receivers of these addresses. THIS MAY AFFECT YOUR PRIVACY. Resubmit with the `privacyPolicy` parameter set to `AllowLinkingAccountAddresses` or weaker if you wish to allow this transaction to proceed anyway.)' + linked_addrs_msg = 'Insufficient funds: have 2.00, need 3.00. (This transaction may require selecting transparent coins that were sent to multiple Unified Addresses, which is not enabled by default because it would create a public link between the transparent receivers of these addresses. THIS MAY AFFECT YOUR PRIVACY. Resubmit with the `privacyPolicy` parameter set to `AllowLinkingAccountAddresses` or weaker if you wish to allow this transaction to proceed anyway.)' opid = self.nodes[1].z_sendmany(n1ua0, recipients, 1, 0) wait_and_assert_operationid_status(self.nodes[1], opid, 'failed', linked_addrs_msg) diff --git a/src/wallet/asyncrpcoperation_sendmany.cpp b/src/wallet/asyncrpcoperation_sendmany.cpp index 83a91838b..7687ec654 100644 --- a/src/wallet/asyncrpcoperation_sendmany.cpp +++ b/src/wallet/asyncrpcoperation_sendmany.cpp @@ -202,7 +202,8 @@ uint256 AsyncRPCOperation_sendmany::main_impl() { // and send the extra to the recipient or the miner fee to avoid // creating dust change, rather than prohibit them from sending // entirely in this circumstance. - // (Daira disagrees, as this could leak information to the recipient) + // (Daira disagrees, as this could leak information to the recipient + // or to a viewing key holder.) insufficientFundsMessage += strprintf( ", need %s more to avoid creating invalid change output %s (dust threshold is %s)", @@ -216,7 +217,7 @@ uint256 AsyncRPCOperation_sendmany::main_impl() { throw JSONRPCError( RPC_WALLET_INSUFFICIENT_FUNDS, insufficientFundsMessage - + (allowTransparentCoinbase && ztxoSelector_.SelectsTransparentCoinbase() ? "" : + + (allowTransparentCoinbase && ztxoSelector_.SelectsTransparentCoinbase() ? "." : "; note that coinbase outputs will not be selected if you specify " "ANY_TADDR or if any transparent recipients are included.") + ((!isFromUa || strategy_.AllowLinkingAccountAddresses()) ? "" :