| 479 | |
| 480 | #if defined(USE_SYSCALL_SANDBOX) |
| 481 | static 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 | |
| 501 | static RPCHelpMan mockscheduler() |
nothing calls this directly
no test coverage detected