chainparams: use SeedSpec6's rather than CAddress's for fixed seeds

This negates the need for CAddress here at all
This commit is contained in:
Cory Fields
2015-01-23 23:40:50 -05:00
parent 1623f6e337
commit 739d6155d3
3 changed files with 32 additions and 30 deletions

View File

@@ -19,6 +19,12 @@ struct CDNSSeedData {
CDNSSeedData(const std::string &strName, const std::string &strHost) : name(strName), host(strHost) {}
};
struct SeedSpec6 {
uint8_t addr[16];
uint16_t port;
};
/**
* CChainParams defines various tweakable parameters of a given instance of the
* Bitcoin system. There are three: the main network on which people trade goods
@@ -67,7 +73,7 @@ public:
std::string NetworkIDString() const { return strNetworkID; }
const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
const std::vector<CAddress>& FixedSeeds() const { return vFixedSeeds; }
const std::vector<SeedSpec6>& FixedSeeds() const { return vFixedSeeds; }
virtual const Checkpoints::CCheckpointData& Checkpoints() const = 0;
protected:
CChainParams() {}
@@ -83,7 +89,7 @@ protected:
std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
std::string strNetworkID;
CBlock genesis;
std::vector<CAddress> vFixedSeeds;
std::vector<SeedSpec6> vFixedSeeds;
bool fRequireRPCPassword;
bool fMiningRequiresPeers;
bool fDefaultConsistencyChecks;