mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +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
@@ -623,20 +623,20 @@ UniValue setnetworkactive(const JSONRPCRequest& request)
|
||||
}
|
||||
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) okSafeMode
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
{ "network", "getconnectioncount", &getconnectioncount, true, {} },
|
||||
{ "network", "ping", &ping, true, {} },
|
||||
{ "network", "getpeerinfo", &getpeerinfo, true, {} },
|
||||
{ "network", "addnode", &addnode, true, {"node","command"} },
|
||||
{ "network", "disconnectnode", &disconnectnode, true, {"address", "nodeid"} },
|
||||
{ "network", "getaddednodeinfo", &getaddednodeinfo, true, {"node"} },
|
||||
{ "network", "getnettotals", &getnettotals, true, {} },
|
||||
{ "network", "getnetworkinfo", &getnetworkinfo, true, {} },
|
||||
{ "network", "setban", &setban, true, {"subnet", "command", "bantime", "absolute"} },
|
||||
{ "network", "listbanned", &listbanned, true, {} },
|
||||
{ "network", "clearbanned", &clearbanned, true, {} },
|
||||
{ "network", "setnetworkactive", &setnetworkactive, true, {"state"} },
|
||||
{ "network", "getconnectioncount", &getconnectioncount, {} },
|
||||
{ "network", "ping", &ping, {} },
|
||||
{ "network", "getpeerinfo", &getpeerinfo, {} },
|
||||
{ "network", "addnode", &addnode, {"node","command"} },
|
||||
{ "network", "disconnectnode", &disconnectnode, {"address", "nodeid"} },
|
||||
{ "network", "getaddednodeinfo", &getaddednodeinfo, {"node"} },
|
||||
{ "network", "getnettotals", &getnettotals, {} },
|
||||
{ "network", "getnetworkinfo", &getnetworkinfo, {} },
|
||||
{ "network", "setban", &setban, {"subnet", "command", "bantime", "absolute"} },
|
||||
{ "network", "listbanned", &listbanned, {} },
|
||||
{ "network", "clearbanned", &clearbanned, {} },
|
||||
{ "network", "setnetworkactive", &setnetworkactive, {"state"} },
|
||||
};
|
||||
|
||||
void RegisterNetRPCCommands(CRPCTable &t)
|
||||
|
||||
Reference in New Issue
Block a user