MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / ParseConfirmTarget

Function ParseConfirmTarget

src/rpc/mining.cpp:36–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#include <stdint.h>
35
36unsigned 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,

Callers 6

sendtoaddressFunction · 0.85
sendmanyFunction · 0.85
FundTransactionFunction · 0.85
bumpfeeFunction · 0.85
estimatesmartfeeFunction · 0.85
estimaterawfeeFunction · 0.85

Calls 3

JSONRPCErrorFunction · 0.85
get_intMethod · 0.80
HighestTargetTrackedMethod · 0.80

Tested by

no test coverage detected