Changeset View
Changeset View
Standalone View
Standalone View
src/net.cpp
Show First 20 Lines • Show All 1,726 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
void StopMapPort() { | void StopMapPort() { | ||||
// Intentionally left blank. | // Intentionally left blank. | ||||
} | } | ||||
#endif | #endif | ||||
void CConnman::ThreadDNSAddressSeed() { | void CConnman::ThreadDNSAddressSeed() { | ||||
FastRandomContext rng; | FastRandomContext rng; | ||||
std::vector<std::string> seeds = config->GetChainParams().DNSSeeds(); | std::vector<std::string> seeds = | ||||
Shuffle(seeds.begin(), seeds.end(), rng); | config->GetChainParams().GetRandomizedDNSSeeds(); | ||||
// Number of seeds left before testing if we have enough connections | // Number of seeds left before testing if we have enough connections | ||||
int seeds_right_now = 0; | int seeds_right_now = 0; | ||||
int found = 0; | int found = 0; | ||||
if (gArgs.GetBoolArg("-forcednsseed", DEFAULT_FORCEDNSSEED)) { | if (gArgs.GetBoolArg("-forcednsseed", DEFAULT_FORCEDNSSEED)) { | ||||
// When -forcednsseed is provided, query all. | // When -forcednsseed is provided, query all. | ||||
seeds_right_now = seeds.size(); | seeds_right_now = seeds.size(); | ||||
} else if (addrman.size() == 0) { | } else if (addrman.size() == 0) { | ||||
▲ Show 20 Lines • Show All 1,426 Lines • Show Last 20 Lines |