diff options
author | Matt Corallo <git@bluematt.me> | 2017-10-19 17:32:45 -0400 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2018-01-19 12:41:28 -1000 |
commit | 62e764219b25f5d5a4de855e53f62c43130ec918 (patch) | |
tree | 6c3737fcfda7f104a23de961b0f636bd4168e2c1 /src/chainparams.h | |
parent | 51ae7660b81f536fb33fff775c1f4f46829d67a7 (diff) |
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.
Diffstat (limited to 'src/chainparams.h')
-rw-r--r-- | src/chainparams.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/chainparams.h b/src/chainparams.h index 0d82a998b1..4b62ca526e 100644 --- a/src/chainparams.h +++ b/src/chainparams.h @@ -14,12 +14,6 @@ #include <memory> #include <vector> -struct CDNSSeedData { - std::string host; - bool supportsServiceBitsFiltering; - CDNSSeedData(const std::string &strHost, bool supportsServiceBitsFilteringIn) : host(strHost), supportsServiceBitsFiltering(supportsServiceBitsFilteringIn) {} -}; - struct SeedSpec6 { uint8_t addr[16]; uint16_t port; @@ -71,7 +65,8 @@ public: bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; } /** Return the BIP70 network string (main, test or regtest) */ std::string NetworkIDString() const { return strNetworkID; } - const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; } + /** Return the list of hostnames to look up for DNS seeds */ + const std::vector<std::string>& DNSSeeds() const { return vSeeds; } const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; } const std::string& Bech32HRP() const { return bech32_hrp; } const std::vector<SeedSpec6>& FixedSeeds() const { return vFixedSeeds; } @@ -85,7 +80,7 @@ protected: CMessageHeader::MessageStartChars pchMessageStart; int nDefaultPort; uint64_t nPruneAfterHeight; - std::vector<CDNSSeedData> vSeeds; + std::vector<std::string> vSeeds; std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES]; std::string bech32_hrp; std::string strNetworkID; |