mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-04 06:12:07 +01:00
Avoid querying DNS seeds, if we have open connections.
The goal is to increase independence and privacy.
Rebased-From: 2e7009d
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
736d8b85b3
commit
026b9dfd6e
12
src/net.cpp
12
src/net.cpp
@@ -1166,6 +1166,18 @@ void MapPort(bool)
|
||||
|
||||
void ThreadDNSAddressSeed()
|
||||
{
|
||||
// goal: only query DNS seeds if address need is acute
|
||||
if ((addrman.size() > 0) &&
|
||||
(!GetBoolArg("-forcednsseed", false))) {
|
||||
MilliSleep(11 * 1000);
|
||||
|
||||
LOCK(cs_vNodes);
|
||||
if (vNodes.size() >= 2) {
|
||||
LogPrintf("P2P peers available. Skipped DNS seeding.\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const vector<CDNSSeedData> &vSeeds = Params().DNSSeeds();
|
||||
int found = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user