Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/node.cpp
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | public: | ||||
// Stop RPC for clean shutdown if any of waitfor* commands is | // Stop RPC for clean shutdown if any of waitfor* commands is | ||||
// executed. | // executed. | ||||
if (gArgs.GetBoolArg("-server", false)) { | if (gArgs.GetBoolArg("-server", false)) { | ||||
InterruptRPC(); | InterruptRPC(); | ||||
StopRPC(); | StopRPC(); | ||||
} | } | ||||
} | } | ||||
bool shutdownRequested() override { return ShutdownRequested(); } | bool shutdownRequested() override { return ShutdownRequested(); } | ||||
void mapPort(bool use_upnp) override { | void mapPort(bool use_upnp) override { StartMapPort(use_upnp); } | ||||
if (use_upnp) { | |||||
StartMapPort(); | |||||
} else { | |||||
InterruptMapPort(); | |||||
StopMapPort(); | |||||
} | |||||
} | |||||
bool getProxy(Network net, proxyType &proxy_info) override { | bool getProxy(Network net, proxyType &proxy_info) override { | ||||
return GetProxy(net, proxy_info); | return GetProxy(net, proxy_info); | ||||
} | } | ||||
size_t getNodeCount(CConnman::NumConnections flags) override { | size_t getNodeCount(CConnman::NumConnections flags) override { | ||||
return m_context->connman ? m_context->connman->GetNodeCount(flags) | return m_context->connman ? m_context->connman->GetNodeCount(flags) | ||||
: 0; | : 0; | ||||
} | } | ||||
bool getNodesStats(NodesStats &stats) override { | bool getNodesStats(NodesStats &stats) override { | ||||
▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines |