diff --git a/bitcoin.cpp b/bitcoin.cpp index 9ccbabf9..f024f62c 100644 --- a/bitcoin.cpp +++ b/bitcoin.cpp @@ -80,7 +80,7 @@ class CNode { CAddress me(CService("0.0.0.0")); BeginMessage("version"); int nBestHeight = GetRequireHeight(); - string ver = "/bitcoin-seeder:0.01/"; + string ver = "/zcash-seeder:0.01/"; vSend << PROTOCOL_VERSION << nLocalServices << nTime << you << me << nLocalNonce << ver << nBestHeight; EndMessage(); } diff --git a/db.h b/db.h index 55e11496..ede71e9e 100644 --- a/db.h +++ b/db.h @@ -12,11 +12,12 @@ #define MIN_RETRY 1000 -#define REQUIRE_VERSION 70001 +#define REQUIRE_VERSION 170005 static inline int GetRequireHeight(const bool testnet = fTestNet) { - return testnet ? 500000 : 350000; + // return testnet ? 500000 : 350000; + return 0; } std::string static inline ToString(const CService &ip) { diff --git a/main.cpp b/main.cpp index d41f78c9..d8d1fac1 100644 --- a/main.cpp +++ b/main.cpp @@ -81,17 +81,17 @@ class CDnsSeedOpts { host = optarg; break; } - + case 'm': { mbox = optarg; break; } - + case 'n': { ns = optarg; break; } - + case 't': { int n = strtol(optarg, NULL, 10); if (n > 0 && n < 1000) nThreads = n; @@ -389,18 +389,14 @@ extern "C" void* ThreadStats(void*) { } while(1); } -static const string mainnet_seeds[] = {"dnsseed.bluematt.me", "bitseed.xf2.org", "dnsseed.bitcoin.dashjr.org", "seed.bitcoin.sipa.be", ""}; -static const string testnet_seeds[] = {"testnet-seed.alexykot.me", - "testnet-seed.bitcoin.petertodd.org", - "testnet-seed.bluematt.me", - "testnet-seed.bitcoin.schildbach.de", - ""}; +static const string mainnet_seeds[] = {"mainnet.z.cash", "dnsseed.str4d.xyz", "dnsseed.znodes.org", ""}; +static const string testnet_seeds[] = {"testnet.z.cash", "explorer.testnet.z.cash", ""}; static const string *seeds = mainnet_seeds; extern "C" void* ThreadSeeder(void*) { - if (!fTestNet){ - db.Add(CService("kjy2eqzk4zwi5zd3.onion", 8333), true); - } + //if (!fTestNet){ + // db.Add(CService("kjy2eqzk4zwi5zd3.onion", 8333), true); + //} do { for (int i=0; seeds[i] != ""; i++) { vector ips; @@ -450,10 +446,10 @@ int main(int argc, char **argv) { bool fDNS = true; if (opts.fUseTestNet) { printf("Using testnet.\n"); - pchMessageStart[0] = 0x0b; - pchMessageStart[1] = 0x11; - pchMessageStart[2] = 0x09; - pchMessageStart[3] = 0x07; + pchMessageStart[0] = 0xFA; + pchMessageStart[1] = 0x1A; + pchMessageStart[2] = 0x24; + pchMessageStart[3] = 0xB6; seeds = testnet_seeds; fTestNet = true; } diff --git a/protocol.cpp b/protocol.cpp index 3df8a187..f4776679 100644 --- a/protocol.cpp +++ b/protocol.cpp @@ -22,7 +22,7 @@ static const char* ppszTypeName[] = "block", }; -unsigned char pchMessageStart[4] = { 0xf9, 0xbe, 0xb4, 0xd9 }; +unsigned char pchMessageStart[4] = { 0x24, 0xE9, 0x27, 0x64 }; CMessageHeader::CMessageHeader() { diff --git a/protocol.h b/protocol.h index e9be1c22..6b77fefb 100644 --- a/protocol.h +++ b/protocol.h @@ -18,7 +18,7 @@ extern bool fTestNet; static inline unsigned short GetDefaultPort(const bool testnet = fTestNet) { - return testnet ? 18333 : 8333; + return testnet ? 18233 : 8233; } // diff --git a/serialize.h b/serialize.h index 4e677c3c..7916e6c5 100644 --- a/serialize.h +++ b/serialize.h @@ -60,7 +60,7 @@ class CDataStream; class CAutoFile; static const unsigned int MAX_SIZE = 0x02000000; -static const int PROTOCOL_VERSION = 60000; +static const int PROTOCOL_VERSION = 170005; // Used to bypass the rule against non-const reference to temporary // where it makes sense with wrappers such as CFlatData or CTxDB