MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / estimatepriority

Function estimatepriority

src/rpcmining.cpp:707–733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

705}
706
707UniValue estimatepriority(const UniValue& params, bool fHelp)
708{
709 if (fHelp || params.size() != 1)
710 throw runtime_error(
711 "estimatepriority nblocks\n"
712 "\nEstimates the approximate priority\n"
713 "a zero-fee transaction needs to begin confirmation\n"
714 "within nblocks blocks.\n"
715 "\nArguments:\n"
716 "1. nblocks (numeric)\n"
717 "\nResult:\n"
718 "n : (numeric) estimated priority\n"
719 "\n"
720 "-1.0 is returned if not enough transactions and\n"
721 "blocks have been observed to make an estimate.\n"
722 "\nExample:\n"
723 + HelpExampleCli("estimatepriority", "6")
724 );
725
726 RPCTypeCheck(params, boost::assign::list_of(UniValue::VNUM));
727
728 int nBlocks = params[0].get_int();
729 if (nBlocks < 1)
730 nBlocks = 1;
731
732 return mempool.estimatePriority(nBlocks);
733}

Callers

nothing calls this directly

Calls 5

HelpExampleCliFunction · 0.85
RPCTypeCheckFunction · 0.85
get_intMethod · 0.80
sizeMethod · 0.45
estimatePriorityMethod · 0.45

Tested by

no test coverage detected