Auto merge of #2525 - bitcartel:2519_no_zero_minconf_from_zaddr_zsendmany, r=daira

When sending from a zaddr, minconf cannot be zero.

Closes #2519.
This commit is contained in:
Homu
2017-07-20 08:24:54 -07:00
3 changed files with 18 additions and 1 deletions

View File

@@ -93,6 +93,10 @@ AsyncRPCOperation_sendmany::AsyncRPCOperation_sendmany(
}
}
if (isfromzaddr_ && minDepth==0) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Minconf cannot be zero when sending from zaddr");
}
// Log the context info i.e. the call parameters to z_sendmany
if (LogAcceptCategory("zrpcunsafe")) {
LogPrint("zrpcunsafe", "%s: z_sendmany initialized (params=%s)\n", getId(), contextInfo.write());