Improve error message in z_sendmany if tx is estimated to be too large
The previous error message was incorrect, it could be too many inputs or a combination of too many inputs and outputs and also did not report the estimated size.
This commit is contained in:
@@ -5311,7 +5311,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
}
|
||||
txsize += CTXOUT_REGULAR_SIZE * taddrRecipients.size();
|
||||
if (txsize > max_tx_size) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Too many outputs, size of raw transaction would be larger than limit of %d bytes", max_tx_size ));
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Size of raw transaction %d would be larger than limit of %d bytes", txsize, max_tx_size ));
|
||||
}
|
||||
|
||||
// Minimum confirmations
|
||||
|
||||
Reference in New Issue
Block a user