| 800 | } |
| 801 | |
| 802 | static RPCHelpMan clearbanned() |
| 803 | { |
| 804 | return RPCHelpMan{"clearbanned", |
| 805 | "\nClear all banned IPs.\n", |
| 806 | {}, |
| 807 | RPCResult{RPCResult::Type::NONE, "", ""}, |
| 808 | RPCExamples{ |
| 809 | HelpExampleCli("clearbanned", "") |
| 810 | + HelpExampleRpc("clearbanned", "") |
| 811 | }, |
| 812 | [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue |
| 813 | { |
| 814 | NodeContext& node = EnsureAnyNodeContext(request.context); |
| 815 | if (!node.banman) { |
| 816 | throw JSONRPCError(RPC_DATABASE_ERROR, "Error: Ban database not loaded"); |
| 817 | } |
| 818 | |
| 819 | node.banman->ClearBanned(); |
| 820 | |
| 821 | return NullUniValue; |
| 822 | }, |
| 823 | }; |
| 824 | } |
| 825 | |
| 826 | static RPCHelpMan setnetworkactive() |
| 827 | { |
nothing calls this directly
no test coverage detected