aboutsummaryrefslogtreecommitdiff
path: root/src/chainparams.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-01-24 13:01:14 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-01-24 13:07:05 +0100
commit6e89de5ba7ce706a9b6897eaf061e19319bc887f (patch)
tree7a04a88d6a366ae16ae04ed3b335ef937713523d /src/chainparams.h
parent8470e64724cb4a668079e7516dc61ec230346618 (diff)
parent2b839abd3e78e28748bbef0708fac74b442e2e36 (diff)
downloadbitcoin-6e89de5ba7ce706a9b6897eaf061e19319bc887f.tar.xz
Merge #11512: Use GetDesireableServiceFlags in seeds, dnsseeds, fixing static seed adding
2b839ab Update chainparams comment for more info on service bits per dnsseed (Matt Corallo) 62e7642 Fall back to oneshot for DNS Seeds which don't support filtering. (Matt Corallo) 51ae766 Use GetDesireableServiceFlags in static seeds, document this. (Matt Corallo) fb6f6b1 bluematt's testnet-seed now supports x9 (and is just a static list) (Matt Corallo) Pull request description: 4440710 broke 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
Diffstat (limited to 'src/chainparams.h')
-rw-r--r--src/chainparams.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/chainparams.h b/src/chainparams.h
index ecfe1a0ac3..d478da9891 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;