Add assert to AsyncRPCOperation_sendmany
This commit is contained in:
parent
10d1b90987
commit
ad0ba9467d
|
@ -196,6 +196,9 @@ bool AsyncRPCOperation_sendmany::main_impl() {
|
|||
CAmount sendAmount = z_outputs_total + t_outputs_total;
|
||||
CAmount targetAmount = sendAmount + minersFee;
|
||||
|
||||
assert(!isfromtaddr_ || z_inputs_total == 0);
|
||||
assert(!isfromzaddr_ || t_inputs_total == 0);
|
||||
|
||||
if (isfromtaddr_ && (t_inputs_total < targetAmount)) {
|
||||
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, strprintf("Insufficient transparent funds, have %ld, need %ld", t_inputs_total, targetAmount));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue