| 34 | #include <stdint.h> |
| 35 | |
| 36 | unsigned int ParseConfirmTarget(const UniValue& value) |
| 37 | { |
| 38 | int target = value.get_int(); |
| 39 | unsigned int max_target = ::feeEstimator.HighestTargetTracked(FeeEstimateHorizon::LONG_HALFLIFE); |
| 40 | if (target < 1 || (unsigned int)target > max_target) { |
| 41 | throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid conf_target, must be between %u - %u", 1, max_target)); |
| 42 | } |
| 43 | return (unsigned int)target; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Return average network hashes per second based on the last 'lookup' blocks, |
no test coverage detected