MCPcopy Create free account
hub / github.com/LUX-Core/lux / OnRPCPreCommand

Function OnRPCPreCommand

src/init.cpp:363–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361}
362
363void OnRPCPreCommand(const CRPCCommand& cmd)
364{
365#ifdef ENABLE_WALLET
366 if (cmd.reqWallet && !pwalletMain)
367 throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Method not found (disabled)");
368#endif
369
370 // Observe safe mode
371 string strWarning = GetWarnings("rpc");
372 if (strWarning != "" && !GetBoolArg("-disablesafemode", false) &&
373 !cmd.okSafeMode)
374 throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, string("Safe mode: ") + strWarning);
375}
376
377std::string HelpMessage(HelpMessageMode mode)
378{

Callers

nothing calls this directly

Calls 3

JSONRPCErrorFunction · 0.85
GetWarningsFunction · 0.85
GetBoolArgFunction · 0.85

Tested by

no test coverage detected