mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
wallet: fundrawtx fee rate coverage, fixup ParseConfirmTarget()
This commit is contained in:
@@ -272,11 +272,12 @@ UniValue DescribeAddress(const CTxDestination& dest)
|
||||
|
||||
unsigned int ParseConfirmTarget(const UniValue& value, unsigned int max_target)
|
||||
{
|
||||
int target = value.get_int();
|
||||
if (target < 1 || (unsigned int)target > max_target) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid conf_target, must be between %u - %u", 1, max_target));
|
||||
const int target{value.get_int()};
|
||||
const unsigned int unsigned_target{static_cast<unsigned int>(target)};
|
||||
if (target < 1 || unsigned_target > max_target) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid conf_target, must be between %u and %u", 1, max_target));
|
||||
}
|
||||
return (unsigned int)target;
|
||||
return unsigned_target;
|
||||
}
|
||||
|
||||
RPCErrorCode RPCErrorFromTransactionError(TransactionError terr)
|
||||
|
||||
Reference in New Issue
Block a user