Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show First 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | static UniValue getmininginfo(const Config &config, | ||||
obj.push_back(Pair("difficulty", double(GetDifficulty(chainActive.Tip())))); | obj.push_back(Pair("difficulty", double(GetDifficulty(chainActive.Tip())))); | ||||
obj.push_back( | obj.push_back( | ||||
Pair("blockprioritypercentage", | Pair("blockprioritypercentage", | ||||
uint8_t(gArgs.GetArg("-blockprioritypercentage", | uint8_t(gArgs.GetArg("-blockprioritypercentage", | ||||
DEFAULT_BLOCK_PRIORITY_PERCENTAGE)))); | DEFAULT_BLOCK_PRIORITY_PERCENTAGE)))); | ||||
obj.push_back(Pair("errors", GetWarnings("statusbar"))); | obj.push_back(Pair("errors", GetWarnings("statusbar"))); | ||||
obj.push_back(Pair("networkhashps", getnetworkhashps(config, request))); | obj.push_back(Pair("networkhashps", getnetworkhashps(config, request))); | ||||
obj.push_back(Pair("pooledtx", uint64_t(mempool.size()))); | obj.push_back(Pair("pooledtx", uint64_t(mempool.size()))); | ||||
obj.push_back(Pair("chain", Params().NetworkIDString())); | obj.push_back(Pair("chain", config.GetChainParams().NetworkIDString())); | ||||
return obj; | return obj; | ||||
} | } | ||||
// NOTE: Unlike wallet RPC (which use BCH values), mining RPCs follow GBT (BIP | // NOTE: Unlike wallet RPC (which use BCH values), mining RPCs follow GBT (BIP | ||||
// 22) in using satoshi amounts | // 22) in using satoshi amounts | ||||
static UniValue prioritisetransaction(const Config &config, | static UniValue prioritisetransaction(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
if (request.fHelp || request.params.size() != 3) { | if (request.fHelp || request.params.size() != 3) { | ||||
▲ Show 20 Lines • Show All 794 Lines • Show Last 20 Lines |