HomePhabricator

Use GetDesireableServiceFlags in seeds, dnsseeds, fixing static seed adding

Description

Use GetDesireableServiceFlags in seeds, dnsseeds, fixing static seed adding

Summary:

  • 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.

  • Fall back to oneshot for DNS Seeds which don't support filtering.

This allows us to not have to update the chainparams whenever a
DNS Seed changes its filtering support, as well fixes a bug
introduced in 44407100f where returned nodes will never be
attempted.

  • Update chainparams comment for more info on service bits per dnsseed

This is a backport of Core PR11512

Depends on D1863

Test Plan:

make check

Reviewers: #bitcoin_abc, schancel

Reviewed By: #bitcoin_abc, schancel

Subscribers: schancel, teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1881

Details

Provenance
Matt Corallo <git@bluematt.me>Authored on Oct 19 2017, 21:32
deadalnixCommitted on Oct 9 2018, 10:42
deadalnixPushed on Oct 9 2018, 10:42
Reviewer
Restricted Project
Differential Revision
D1881: Use GetDesireableServiceFlags in seeds, dnsseeds, fixing static seed adding
Parents
rABCd498617f8cdf: [refactor] Config handling refactoring in preparation for network-specific…
Branches
Unknown
Tags
Unknown