Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 1,933 Lines • ▼ Show 20 Lines | #endif | ||||
// 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 | ||||
// is not yet setup and may end up being set up twice if we | // is not yet setup and may end up being set up twice if we | ||||
// need to reindex later. | // need to reindex later. | ||||
assert(!g_connman); | assert(!g_connman); | ||||
g_connman = std::unique_ptr<CConnman>( | g_connman = std::make_unique<CConnman>( | ||||
new CConnman(config, GetRand(std::numeric_limits<uint64_t>::max()), | config, GetRand(std::numeric_limits<uint64_t>::max()), | ||||
GetRand(std::numeric_limits<uint64_t>::max()))); | GetRand(std::numeric_limits<uint64_t>::max())); | ||||
CConnman &connman = *g_connman; | CConnman &connman = *g_connman; | ||||
peerLogic.reset(new PeerLogicValidation( | peerLogic.reset(new PeerLogicValidation( | ||||
&connman, scheduler, | &connman, scheduler, | ||||
gArgs.GetBoolArg("-enablebip61", DEFAULT_ENABLE_BIP61))); | gArgs.GetBoolArg("-enablebip61", DEFAULT_ENABLE_BIP61))); | ||||
RegisterValidationInterface(peerLogic.get()); | RegisterValidationInterface(peerLogic.get()); | ||||
// sanitize comments per BIP-0014, format user agent and check total size | // sanitize comments per BIP-0014, format user agent and check total size | ||||
▲ Show 20 Lines • Show All 544 Lines • Show Last 20 Lines |