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

Function getdifficulty

src/rpc/blockchain.cpp:361–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361static UniValue getdifficulty(const JSONRPCRequest& request)
362{
363 if (request.fHelp || request.params.size() != 0)
364 throw std::runtime_error(
365 "getdifficulty\n"
366 "\nReturns the proof-of-work difficulty as a multiple of the minimum difficulty.\n"
367 "\nResult:\n"
368 "n.nnn (numeric) the proof-of-work difficulty as a multiple of the minimum difficulty.\n"
369 "\nExamples:\n"
370 + HelpExampleCli("getdifficulty", "")
371 + HelpExampleRpc("getdifficulty", "")
372 );
373
374 LOCK(cs_main);
375 return GetDifficulty(chainActive.Tip());
376}
377
378static std::string EntryDescriptionString()
379{

Callers

nothing calls this directly

Calls 5

HelpExampleCliFunction · 0.85
HelpExampleRpcFunction · 0.85
GetDifficultyFunction · 0.85
sizeMethod · 0.45
TipMethod · 0.45

Tested by

no test coverage detected