| 351 | } |
| 352 | |
| 353 | unsigned int ParseConfirmTarget(const UniValue& value, unsigned int max_target) |
| 354 | { |
| 355 | const int target{value.get_int()}; |
| 356 | const unsigned int unsigned_target{static_cast<unsigned int>(target)}; |
| 357 | if (target < 1 || unsigned_target > max_target) { |
| 358 | throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid conf_target, must be between %u and %u", 1, max_target)); |
| 359 | } |
| 360 | return unsigned_target; |
| 361 | } |
| 362 | |
| 363 | RPCErrorCode RPCErrorFromTransactionError(TransactionError terr) |
| 364 | { |