MCPcopy Create free account
hub / github.com/ElementsProject/elements / invokedisallowedsyscall

Function invokedisallowedsyscall

src/rpc/misc.cpp:481–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479
480#if defined(USE_SYSCALL_SANDBOX)
481static RPCHelpMan invokedisallowedsyscall()
482{
483 return RPCHelpMan{
484 "invokedisallowedsyscall",
485 "\nInvoke a disallowed syscall to trigger a syscall sandbox violation. Used for testing purposes.\n",
486 {},
487 RPCResult{RPCResult::Type::NONE, "", ""},
488 RPCExamples{
489 HelpExampleCli("invokedisallowedsyscall", "") + HelpExampleRpc("invokedisallowedsyscall", "")},
490 [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
491 if (!Params().IsTestChain()) {
492 throw std::runtime_error("invokedisallowedsyscall is used for testing only.");
493 }
494 TestDisallowedSandboxCall();
495 return NullUniValue;
496 },
497 };
498}
499#endif // USE_SYSCALL_SANDBOX
500
501static RPCHelpMan mockscheduler()

Callers

nothing calls this directly

Calls 5

HelpExampleCliFunction · 0.85
HelpExampleRpcFunction · 0.85
IsTestChainMethod · 0.80
ParamsClass · 0.50

Tested by

no test coverage detected