File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Utility to generate the seeds.txt list that is compiled into the client
4
4
(see [ src/chainparamsseeds.h] ( /src/chainparamsseeds.h ) and other utilities in [ contrib/seeds] ( /contrib/seeds ) ).
5
5
6
6
Be sure to update ` PATTERN_AGENT ` in ` makeseeds.py ` to include the current version,
7
- and remove old versions as necessary (at a minimum when GetDesirableServiceFlags
7
+ and remove old versions as necessary (at a minimum when SeedsServiceFlags()
8
8
changes its default return value, as those are the services which seeds are added
9
9
to addrman with).
10
10
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ static std::vector<CAddress> ConvertSeeds(const std::vector<uint8_t> &vSeedsIn)
202
202
while (!s.eof ()) {
203
203
CService endpoint;
204
204
s >> endpoint;
205
- CAddress addr{endpoint, GetDesirableServiceFlags (NODE_NONE )};
205
+ CAddress addr{endpoint, SeedsServiceFlags ( )};
206
206
addr.nTime = rng.rand_uniform_delay (Now<NodeSeconds>() - one_week, -one_week);
207
207
LogPrint (BCLog::NET, " Added hardcoded seed: %s\n " , addr.ToStringAddrPort ());
208
208
vSeedsOut.push_back (addr);
@@ -2273,7 +2273,7 @@ void CConnman::ThreadDNSAddressSeed()
2273
2273
AddAddrFetch (seed);
2274
2274
} else {
2275
2275
std::vector<CAddress> vAdd;
2276
- ServiceFlags requiredServiceBits = GetDesirableServiceFlags (NODE_NONE) ;
2276
+ constexpr ServiceFlags requiredServiceBits{ SeedsServiceFlags ()} ;
2277
2277
std::string host = strprintf (" x%x.%s" , requiredServiceBits, seed);
2278
2278
CNetAddr resolveSource;
2279
2279
if (!resolveSource.SetInternal (host)) {
Original file line number Diff line number Diff line change @@ -330,12 +330,17 @@ std::vector<std::string> serviceFlagsToStr(uint64_t flags);
330
330
* guaranteed to not change dependent on state - ie they are suitable for
331
331
* use when describing peers which we know to be desirable, but for which
332
332
* we do not have a confirmed set of service flags.
333
- *
334
- * If the NODE_NONE return value is changed, contrib/seeds/makeseeds.py
335
- * should be updated appropriately to filter for the same nodes.
336
333
*/
337
334
ServiceFlags GetDesirableServiceFlags (ServiceFlags services);
338
335
336
+ /* *
337
+ * State independent service flags.
338
+ * If the return value is changed, contrib/seeds/makeseeds.py
339
+ * should be updated appropriately to filter for nodes with
340
+ * desired service flags (compatible with our new flags).
341
+ */
342
+ constexpr ServiceFlags SeedsServiceFlags () { return ServiceFlags (NODE_NETWORK | NODE_WITNESS); }
343
+
339
344
/* * Set the current IBD status in order to figure out the desirable service flags */
340
345
void SetServiceFlagsIBDCache (bool status);
341
346
You can’t perform that action at this time.
0 commit comments