Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | void Shutdown(NodeContext &node) { | ||||
threadGroup.join_all(); | threadGroup.join_all(); | ||||
// After the threads that potentially access these pointers have been | // After the threads that potentially access these pointers have been | ||||
// stopped, destruct and reset all to nullptr. | // stopped, destruct and reset all to nullptr. | ||||
node.peer_logic.reset(); | node.peer_logic.reset(); | ||||
// Destroy various global instances | // Destroy various global instances | ||||
g_avalanche.reset(); | g_avalanche.reset(); | ||||
g_block_template_manager.reset(); | |||||
node.connman.reset(); | node.connman.reset(); | ||||
node.banman.reset(); | node.banman.reset(); | ||||
g_txindex.reset(); | g_txindex.reset(); | ||||
DestroyAllBlockFilterIndexes(); | DestroyAllBlockFilterIndexes(); | ||||
if (::g_mempool.IsLoaded() && | if (::g_mempool.IsLoaded() && | ||||
gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) { | gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) { | ||||
DumpMempool(::g_mempool); | DumpMempool(::g_mempool); | ||||
▲ Show 20 Lines • Show All 2,533 Lines • ▼ Show 20 Lines | if (!connOptions.m_use_addrman_outgoing) { | ||||
if (connect.size() != 1 || connect[0] != "0") { | if (connect.size() != 1 || connect[0] != "0") { | ||||
connOptions.m_specified_outgoing = connect; | connOptions.m_specified_outgoing = connect; | ||||
} | } | ||||
} | } | ||||
if (!node.connman->Start(*node.scheduler, connOptions)) { | if (!node.connman->Start(*node.scheduler, connOptions)) { | ||||
return false; | return false; | ||||
} | } | ||||
// Step 12.5 (I guess ?): Initialize Block Template Manager | |||||
g_block_template_manager = std::make_unique<BlockTemplateManager>(); | |||||
// Step 13: finished | // Step 13: finished | ||||
SetRPCWarmupFinished(); | SetRPCWarmupFinished(); | ||||
uiInterface.InitMessage(_("Done loading").translated); | uiInterface.InitMessage(_("Done loading").translated); | ||||
for (const auto &client : node.chain_clients) { | for (const auto &client : node.chain_clients) { | ||||
client->start(*node.scheduler); | client->start(*node.scheduler); | ||||
} | } | ||||
Show All 14 Lines |