mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-25 06:55:32 +01:00
rpc: Push down safe mode checks
This contains most of the changes of 10563 "remove safe mode", but doesn't remove the safe mode yet, but put an `ObserveSafeMode()` check in individual calls with okSafeMode=false. This cleans up the ugly "okSafeMode" flag from the dispatch tables, which is not a concern for the RPC server. Extra-author: Wladimir J. van der Laan <laanwj@gmail.com>
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
cee4fe1d53
commit
ec6902d0ea
@@ -967,20 +967,21 @@ UniValue estimaterawfee(const JSONRPCRequest& request)
|
||||
}
|
||||
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) okSafeMode
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
{ "mining", "getnetworkhashps", &getnetworkhashps, true, {"nblocks","height"} },
|
||||
{ "mining", "getmininginfo", &getmininginfo, true, {} },
|
||||
{ "mining", "prioritisetransaction", &prioritisetransaction, true, {"txid","dummy","fee_delta"} },
|
||||
{ "mining", "getblocktemplate", &getblocktemplate, true, {"template_request"} },
|
||||
{ "mining", "submitblock", &submitblock, true, {"hexdata","dummy"} },
|
||||
{ "mining", "getnetworkhashps", &getnetworkhashps, {"nblocks","height"} },
|
||||
{ "mining", "getmininginfo", &getmininginfo, {} },
|
||||
{ "mining", "prioritisetransaction", &prioritisetransaction, {"txid","dummy","fee_delta"} },
|
||||
{ "mining", "getblocktemplate", &getblocktemplate, {"template_request"} },
|
||||
{ "mining", "submitblock", &submitblock, {"hexdata","dummy"} },
|
||||
|
||||
{ "generating", "generatetoaddress", &generatetoaddress, true, {"nblocks","address","maxtries"} },
|
||||
|
||||
{ "util", "estimatefee", &estimatefee, true, {"nblocks"} },
|
||||
{ "util", "estimatesmartfee", &estimatesmartfee, true, {"conf_target", "estimate_mode"} },
|
||||
{ "generating", "generatetoaddress", &generatetoaddress, {"nblocks","address","maxtries"} },
|
||||
|
||||
{ "hidden", "estimaterawfee", &estimaterawfee, true, {"conf_target", "threshold"} },
|
||||
{ "util", "estimatefee", &estimatefee, {"nblocks"} },
|
||||
{ "util", "estimatesmartfee", &estimatesmartfee, {"nblocks", "estimate_mode"} },
|
||||
|
||||
{ "hidden", "estimaterawfee", &estimaterawfee, {"conf_target", "threshold"} },
|
||||
};
|
||||
|
||||
void RegisterMiningRPCCommands(CRPCTable &t)
|
||||
|
||||
Reference in New Issue
Block a user