Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/node.cpp
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | public: | ||||
m_context->chain = MakeChain(*m_context, config.GetChainParams()); | m_context->chain = MakeChain(*m_context, config.GetChainParams()); | ||||
return AppInitMain(config, rpcServer, httpRPCRequestProcessor, | return AppInitMain(config, rpcServer, httpRPCRequestProcessor, | ||||
*m_context); | *m_context); | ||||
} | } | ||||
void appShutdown() override { | void appShutdown() override { | ||||
Interrupt(*m_context); | Interrupt(*m_context); | ||||
Shutdown(*m_context); | Shutdown(*m_context); | ||||
} | } | ||||
void startShutdown() override { StartShutdown(); } | void startShutdown() override { | ||||
StartShutdown(); | |||||
// Stop RPC for clean shutdown if any of waitfor* commands is | |||||
// executed. | |||||
if (gArgs.GetBoolArg("-server", false)) { | |||||
InterruptRPC(); | |||||
StopRPC(); | |||||
} | |||||
} | |||||
bool shutdownRequested() override { return ShutdownRequested(); } | bool shutdownRequested() override { return ShutdownRequested(); } | ||||
void mapPort(bool use_upnp) override { | void mapPort(bool use_upnp) override { | ||||
if (use_upnp) { | if (use_upnp) { | ||||
StartMapPort(); | StartMapPort(); | ||||
} else { | } else { | ||||
InterruptMapPort(); | InterruptMapPort(); | ||||
StopMapPort(); | StopMapPort(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 268 Lines • Show Last 20 Lines |