mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
net: decouple state independent service flags from desirable ones
This former one will be moved to the peer manager class in the following-up commit.
This commit is contained in:
@@ -202,7 +202,7 @@ static std::vector<CAddress> ConvertSeeds(const std::vector<uint8_t> &vSeedsIn)
|
||||
while (!s.eof()) {
|
||||
CService endpoint;
|
||||
s >> endpoint;
|
||||
CAddress addr{endpoint, GetDesirableServiceFlags(NODE_NONE)};
|
||||
CAddress addr{endpoint, SeedsServiceFlags()};
|
||||
addr.nTime = rng.rand_uniform_delay(Now<NodeSeconds>() - one_week, -one_week);
|
||||
LogPrint(BCLog::NET, "Added hardcoded seed: %s\n", addr.ToStringAddrPort());
|
||||
vSeedsOut.push_back(addr);
|
||||
@@ -2273,7 +2273,7 @@ void CConnman::ThreadDNSAddressSeed()
|
||||
AddAddrFetch(seed);
|
||||
} else {
|
||||
std::vector<CAddress> vAdd;
|
||||
ServiceFlags requiredServiceBits = GetDesirableServiceFlags(NODE_NONE);
|
||||
constexpr ServiceFlags requiredServiceBits{SeedsServiceFlags()};
|
||||
std::string host = strprintf("x%x.%s", requiredServiceBits, seed);
|
||||
CNetAddr resolveSource;
|
||||
if (!resolveSource.SetInternal(host)) {
|
||||
|
||||
Reference in New Issue
Block a user