aboutsummaryrefslogtreecommitdiff
path: root/src/chainparams.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/chainparams.cpp')
-rw-r--r--src/chainparams.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index a9dd4c257a..1e044ad491 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -5,7 +5,6 @@
#include "chainparams.h"
-#include "random.h"
#include "util.h"
#include "utilstrencodings.h"
@@ -15,35 +14,11 @@
using namespace std;
-struct SeedSpec6 {
- uint8_t addr[16];
- uint16_t port;
-};
-
#include "chainparamsseeds.h"
/**
* Main network
*/
-
-//! Convert the pnSeeds6 array into usable address objects.
-static void convertSeed6(std::vector<CAddress> &vSeedsOut, const SeedSpec6 *data, unsigned int count)
-{
- // It'll only connect to one or two seed nodes because once it connects,
- // it'll get a pile of addresses with newer timestamps.
- // Seed nodes are given a random 'last seen time' of between one and two
- // weeks ago.
- const int64_t nOneWeek = 7*24*60*60;
- for (unsigned int i = 0; i < count; i++)
- {
- struct in6_addr ip;
- memcpy(&ip, data[i].addr, sizeof(ip));
- CAddress addr(CService(ip, data[i].port));
- addr.nTime = GetTime() - GetRand(nOneWeek) - nOneWeek;
- vSeedsOut.push_back(addr);
- }
-}
-
/**
* What makes a good checkpoint block?
* + Is surrounded by blocks with reasonable timestamps
@@ -165,7 +140,7 @@ public:
base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();
- convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));
+ vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
fRequireRPCPassword = true;
fMiningRequiresPeers = true;
@@ -221,7 +196,7 @@ public:
base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();
base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();
- convertSeed6(vFixedSeeds, pnSeed6_test, ARRAYLEN(pnSeed6_test));
+ vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));
fRequireRPCPassword = true;
fMiningRequiresPeers = true;