mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 12:22:39 -03:00
net: manually resolve dns seed sources
Note: Some seeds aren't actually returning an IP for their name entries, so they're being added to addrman with a source of [::]. This commit shouldn't change that behavior, for better or worse.
This commit is contained in:
parent
e9fc71e5fa
commit
a98cd1fc86
1 changed files with 9 additions and 1 deletions
10
src/net.cpp
10
src/net.cpp
|
@ -1454,7 +1454,15 @@ void ThreadDNSAddressSeed()
|
||||||
found++;
|
found++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addrman.Add(vAdd, CNetAddr(seed.name, true));
|
// TODO: The seed name resolve may fail, yielding an IP of [::], which results in
|
||||||
|
// addrman assigning the same source to results from different seeds.
|
||||||
|
// This should switch to a hard-coded stable dummy IP for each seed name, so that the
|
||||||
|
// resolve is not required at all.
|
||||||
|
if (!vIPs.empty()) {
|
||||||
|
CService seedSource;
|
||||||
|
Lookup(seed.name.c_str(), seedSource, 0, true);
|
||||||
|
addrman.Add(vAdd, seedSource);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue