Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 1,938 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_banman); | assert(!g_banman); | ||||
g_banman = std::make_unique<BanMan>(config.GetChainParams(), &uiInterface); | g_banman = std::make_unique<BanMan>(GetDataDir() / "banlist.dat", | ||||
config.GetChainParams(), &uiInterface); | |||||
assert(!g_connman); | assert(!g_connman); | ||||
g_connman = std::unique_ptr<CConnman>( | g_connman = std::unique_ptr<CConnman>( | ||||
new CConnman(config, GetRand(std::numeric_limits<uint64_t>::max()), | new CConnman(config, GetRand(std::numeric_limits<uint64_t>::max()), | ||||
GetRand(std::numeric_limits<uint64_t>::max()))); | GetRand(std::numeric_limits<uint64_t>::max()))); | ||||
peerLogic.reset(new PeerLogicValidation( | peerLogic.reset(new PeerLogicValidation( | ||||
g_connman.get(), g_banman.get(), scheduler, | g_connman.get(), g_banman.get(), scheduler, | ||||
gArgs.GetBoolArg("-enablebip61", DEFAULT_ENABLE_BIP61))); | gArgs.GetBoolArg("-enablebip61", DEFAULT_ENABLE_BIP61))); | ||||
▲ Show 20 Lines • Show All 555 Lines • Show Last 20 Lines |