customized zclseeder to btcpseeder

This commit is contained in:
Rizki Wicaksono 2018-03-05 09:57:21 +00:00
parent a4a991ff8f
commit c0a63e4945
5 changed files with 10 additions and 14 deletions

View File

@ -80,7 +80,7 @@ class CNode {
CAddress me(CService("0.0.0.0"));
BeginMessage("version");
int nBestHeight = GetRequireHeight();
string ver = "/zclassic-seeder:1.00/";
string ver = "/btcpseeder:0.01/";
vSend << PROTOCOL_VERSION << nLocalServices << nTime << you << me << nLocalNonce << ver << nBestHeight;
EndMessage();
}

View File

@ -184,11 +184,7 @@ extern "C" void* ThreadCrawler(void* data) {
res.nHeight = 0;
res.strClientV = "";
bool getaddr = res.ourLastSuccess + 86400 < now;
if (res.service.GetPort() == GetDefaultPort()) {
res.fGood = TestNode(res.service,res.nBanTime,res.nClientV,res.strClientV,res.nHeight,getaddr ? &addr : NULL);
} else {
res.fGood = false;
}
res.fGood = TestNode(res.service,res.nBanTime,res.nClientV,res.strClientV,res.nHeight,getaddr ? &addr : NULL);
}
db.ResultMany(ips);
db.Add(addr);
@ -394,7 +390,7 @@ extern "C" void* ThreadStats(void*) {
return nullptr;
}
static const string mainnet_seeds[] = {"na1.zclassic.org","seed.zcl.chains.run",""};
static const string mainnet_seeds[] = {"dnsseed.btcprivate.org",""};
static const string testnet_seeds[] = {""};
static const string *seeds = mainnet_seeds;
@ -452,10 +448,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] = 0xf6;
pchMessageStart[1] = 0x1b;
pchMessageStart[2] = 0xf6;
pchMessageStart[3] = 0xd6;
seeds = testnet_seeds;
fTestNet = true;
}

View File

@ -22,7 +22,7 @@ static const char* ppszTypeName[] =
"block",
};
unsigned char pchMessageStart[4] = { 0x24, 0xe9, 0x27, 0x64 };
unsigned char pchMessageStart[4] = { 0xa8, 0xea, 0xa2, 0xcd };
CMessageHeader::CMessageHeader()
{

View File

@ -18,7 +18,7 @@
extern bool fTestNet;
static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
{
return testnet ? 18033 : 8033;
return testnet ? 17933 : 7933;
}
//

View File

@ -60,7 +60,7 @@ class CDataStream;
class CAutoFile;
static const unsigned int MAX_SIZE = 0x02000000;
static const int PROTOCOL_VERSION = 170002;
static const int PROTOCOL_VERSION = 180003;
// Used to bypass the rule against non-const reference to temporary
// where it makes sense with wrappers such as CFlatData or CTxDB