Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 2,275 Lines • ▼ Show 20 Lines | if (args.GetBoolArg("-server", false)) { | ||||
if (!AppInitServers(config, httpRPCRequestProcessor, node)) { | if (!AppInitServers(config, httpRPCRequestProcessor, node)) { | ||||
return InitError( | return InitError( | ||||
_("Unable to start HTTP server. See debug log for details.")); | _("Unable to start HTTP server. See debug log for details.")); | ||||
} | } | ||||
} | } | ||||
// Step 5: verify wallet database integrity | // Step 5: verify wallet database integrity | ||||
for (const auto &client : node.chain_clients) { | for (const auto &client : node.chain_clients) { | ||||
if (!client->verify(chainparams)) { | if (!client->verify()) { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
// Step 6: network initialization | // Step 6: network initialization | ||||
// Note that we absolutely cannot open any actual connections | // Note that we absolutely cannot open any actual connections | ||||
// until the very end ("start node") as the UTXO/block state | // until the very end ("start node") as the UTXO/block state | ||||
▲ Show 20 Lines • Show All 535 Lines • ▼ Show 20 Lines | #endif | ||||
for (const auto &filter_type : g_enabled_filter_types) { | for (const auto &filter_type : g_enabled_filter_types) { | ||||
InitBlockFilterIndex(filter_type, filter_index_cache, false, fReindex); | InitBlockFilterIndex(filter_type, filter_index_cache, false, fReindex); | ||||
GetBlockFilterIndex(filter_type)->Start(); | GetBlockFilterIndex(filter_type)->Start(); | ||||
} | } | ||||
// Step 9: load wallet | // Step 9: load wallet | ||||
for (const auto &client : node.chain_clients) { | for (const auto &client : node.chain_clients) { | ||||
if (!client->load(chainparams)) { | if (!client->load()) { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
// Step 10: data directory maintenance | // Step 10: data directory maintenance | ||||
// if pruning, unset the service bit and perform the initial blockstore | // if pruning, unset the service bit and perform the initial blockstore | ||||
// prune after any wallet rescanning has taken place. | // prune after any wallet rescanning has taken place. | ||||
▲ Show 20 Lines • Show All 204 Lines • Show Last 20 Lines |