Apply suggestions from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
5f0681a601
commit
cf720fcf0f
|
@ -317,7 +317,7 @@ class WalletZSendmanyTest(BitcoinTestFramework):
|
||||||
|
|
||||||
# If we try to send 3 ZEC from n1ua0, it will fail with too-few funds.
|
# If we try to send 3 ZEC from n1ua0, it will fail with too-few funds.
|
||||||
recipients = [{"address":n0ua0, "amount":3}]
|
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)
|
opid = self.nodes[1].z_sendmany(n1ua0, recipients, 1, 0)
|
||||||
wait_and_assert_operationid_status(self.nodes[1], opid, 'failed', linked_addrs_msg)
|
wait_and_assert_operationid_status(self.nodes[1], opid, 'failed', linked_addrs_msg)
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,8 @@ uint256 AsyncRPCOperation_sendmany::main_impl() {
|
||||||
// and send the extra to the recipient or the miner fee to avoid
|
// and send the extra to the recipient or the miner fee to avoid
|
||||||
// creating dust change, rather than prohibit them from sending
|
// creating dust change, rather than prohibit them from sending
|
||||||
// entirely in this circumstance.
|
// 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 +=
|
insufficientFundsMessage +=
|
||||||
strprintf(
|
strprintf(
|
||||||
", need %s more to avoid creating invalid change output %s (dust threshold is %s)",
|
", 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(
|
throw JSONRPCError(
|
||||||
RPC_WALLET_INSUFFICIENT_FUNDS,
|
RPC_WALLET_INSUFFICIENT_FUNDS,
|
||||||
insufficientFundsMessage
|
insufficientFundsMessage
|
||||||
+ (allowTransparentCoinbase && ztxoSelector_.SelectsTransparentCoinbase() ? "" :
|
+ (allowTransparentCoinbase && ztxoSelector_.SelectsTransparentCoinbase() ? "." :
|
||||||
"; note that coinbase outputs will not be selected if you specify "
|
"; note that coinbase outputs will not be selected if you specify "
|
||||||
"ANY_TADDR or if any transparent recipients are included.")
|
"ANY_TADDR or if any transparent recipients are included.")
|
||||||
+ ((!isFromUa || strategy_.AllowLinkingAccountAddresses()) ? "" :
|
+ ((!isFromUa || strategy_.AllowLinkingAccountAddresses()) ? "" :
|
||||||
|
|
Loading…
Reference in New Issue