Browse Source

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.
duke
Duke 2 months ago
parent
commit
975f22bfa0
  1. 2
      src/wallet/rpcwallet.cpp

2
src/wallet/rpcwallet.cpp

@ -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

Loading…
Cancel
Save