aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-10-19 17:32:33 -0400
committerMatt Corallo <git@bluematt.me>2018-01-19 12:40:05 -1000
commit51ae7660b81f536fb33fff775c1f4f46829d67a7 (patch)
treec2337c39998d95e8ce5afc98ebdf209ecfec9500 /src/protocol.h
parentfb6f6b1519b0518b8939947043ea34b00bd05c7c (diff)
Use GetDesireableServiceFlags in static seeds, document this.
44407100f broke inserting entries into addrman from static seeds (as well as dnsseeds which did not support service bits). 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, we will later fix by falling back to oneshot if a seed does not support filtering.
Diffstat (limited to 'src/protocol.h')
-rw-r--r--src/protocol.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/protocol.h b/src/protocol.h
index cf1d40db77..1de8a165c8 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -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);