net: Deserialize hardcoded seeds from BIP155 blob

Switch from IPv6 slot-based format to more compact and flexible BIP155
format.
This commit is contained in:
W. J. van der Laan
2021-03-31 13:29:24 +02:00
parent 9b29d5df7f
commit b2ee8b207d
4 changed files with 1211 additions and 1192 deletions

View File

@@ -14,11 +14,6 @@
#include <memory>
#include <vector>
struct SeedSpec6 {
uint8_t addr[16];
uint16_t port;
};
typedef std::map<int, uint256> MapCheckpoints;
struct CCheckpointData {
@@ -108,7 +103,7 @@ public:
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; }
const std::vector<uint8_t>& FixedSeeds() const { return vFixedSeeds; }
const CCheckpointData& Checkpoints() const { return checkpointData; }
//! Get allowed assumeutxo configuration.
@@ -130,7 +125,7 @@ protected:
std::string bech32_hrp;
std::string strNetworkID;
CBlock genesis;
std::vector<SeedSpec6> vFixedSeeds;
std::vector<uint8_t> vFixedSeeds;
bool fDefaultConsistencyChecks;
bool fRequireStandard;
bool m_is_test_chain;