mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge #11512: Use GetDesireableServiceFlags in seeds, dnsseeds, fixing static seed adding
2b839abUpdate chainparams comment for more info on service bits per dnsseed (Matt Corallo)62e7642Fall back to oneshot for DNS Seeds which don't support filtering. (Matt Corallo)51ae766Use GetDesireableServiceFlags in static seeds, document this. (Matt Corallo)fb6f6b1bluematt's testnet-seed now supports x9 (and is just a static list) (Matt Corallo) Pull request description:4440710broke inserting entries into addrman from dnsseeds which did not support service bits, as well as static seeds. Static seeds were already being filtered by UA for 0.13.1+ (ie NODE_WITNESS), so simply changing the default service bits to include NODE_WITNESS (and updating docs appropriately) is sufficient. For DNS Seeds, not supporting NODE_WITNESS is no longer useful, so instead use non-filtering seeds as oneshot hosts irrespective of named proxy. I've set my testnet-seed to also support x9, though because it is simply a static host, it may be useful to leave the support off so that it is used as a oneshot to get addresses from a live node instead. I'm fine with either. Tree-SHA512: 3f17d4d2b0b84d876981c962d2b44cb0c8f95f52c56a48c6b35fd882f6d7a40805f320ec452985a1c0b34aebddb1922709156c3ceccd1b9f8363fd7cb537d21d
This commit is contained in:
@@ -291,7 +291,15 @@ enum ServiceFlags : uint64_t {
|
||||
* unless they set NODE_NETWORK_LIMITED and we are out of IBD, in which
|
||||
* case NODE_NETWORK_LIMITED suffices).
|
||||
*
|
||||
* Thus, generally, avoid calling with peerServices == NODE_NONE.
|
||||
* Thus, generally, avoid calling with peerServices == NODE_NONE, unless
|
||||
* state-specific flags must absolutely be avoided. When called with
|
||||
* peerServices == NODE_NONE, the returned desirable service flags are
|
||||
* guaranteed to not change dependant on state - ie they are suitable for
|
||||
* use when describing peers which we know to be desirable, but for which
|
||||
* we do not have a confirmed set of service flags.
|
||||
*
|
||||
* If the NODE_NONE return value is changed, contrib/seeds/makeseeds.py
|
||||
* should be updated appropriately to filter for the same nodes.
|
||||
*/
|
||||
static ServiceFlags GetDesirableServiceFlags(ServiceFlags services) {
|
||||
return ServiceFlags(NODE_NETWORK | NODE_WITNESS);
|
||||
|
||||
Reference in New Issue
Block a user