| 367 | } |
| 368 | |
| 369 | unsigned int ParseConfirmTarget(const UniValue& value, unsigned int max_target) |
| 370 | { |
| 371 | const int target{value.getInt<int>()}; |
| 372 | const unsigned int unsigned_target{static_cast<unsigned int>(target)}; |
| 373 | if (target < 1 || unsigned_target > max_target) { |
| 374 | throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid conf_target, must be between %u and %u", 1, max_target)); |
| 375 | } |
| 376 | return unsigned_target; |
| 377 | } |
| 378 | |
| 379 | RPCErrorCode RPCErrorFromPSBTError(PSBTError err) |
| 380 | { |
no test coverage detected