Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/mining.cpp
Show First 20 Lines • Show All 1,136 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"transaction\n", | "transaction\n", | ||||
{}, | {}, | ||||
RPCResult{RPCResult::Type::NUM, "", "estimated fee-per-kilobyte"}, | RPCResult{RPCResult::Type::NUM, "", "estimated fee-per-kilobyte"}, | ||||
RPCExamples{HelpExampleCli("estimatefee", "")}, | RPCExamples{HelpExampleCli("estimatefee", "")}, | ||||
} | } | ||||
.Check(request); | .Check(request); | ||||
const CTxMemPool &mempool = EnsureMemPool(request.context); | const CTxMemPool &mempool = EnsureMemPool(request.context); | ||||
return ValueFromAmount(mempool.estimateFee().GetFeePerK()); | return mempool.estimateFee().GetFeePerK(); | ||||
} | } | ||||
void RegisterMiningRPCCommands(CRPCTable &t) { | void RegisterMiningRPCCommands(CRPCTable &t) { | ||||
// clang-format off | // clang-format off | ||||
static const CRPCCommand commands[] = { | static const CRPCCommand commands[] = { | ||||
// category name actor (function) argNames | // category name actor (function) argNames | ||||
// ---------- ------------------------ ---------------------- ---------- | // ---------- ------------------------ ---------------------- ---------- | ||||
{"mining", "getnetworkhashps", getnetworkhashps, {"nblocks", "height"}}, | {"mining", "getnetworkhashps", getnetworkhashps, {"nblocks", "height"}}, | ||||
Show All 18 Lines |