customized zclseeder to btcpseeder
This commit is contained in:
parent
a4a991ff8f
commit
c0a63e4945
|
@ -80,7 +80,7 @@ class CNode {
|
||||||
CAddress me(CService("0.0.0.0"));
|
CAddress me(CService("0.0.0.0"));
|
||||||
BeginMessage("version");
|
BeginMessage("version");
|
||||||
int nBestHeight = GetRequireHeight();
|
int nBestHeight = GetRequireHeight();
|
||||||
string ver = "/zclassic-seeder:1.00/";
|
string ver = "/btcpseeder:0.01/";
|
||||||
vSend << PROTOCOL_VERSION << nLocalServices << nTime << you << me << nLocalNonce << ver << nBestHeight;
|
vSend << PROTOCOL_VERSION << nLocalServices << nTime << you << me << nLocalNonce << ver << nBestHeight;
|
||||||
EndMessage();
|
EndMessage();
|
||||||
}
|
}
|
||||||
|
|
14
main.cpp
14
main.cpp
|
@ -184,11 +184,7 @@ extern "C" void* ThreadCrawler(void* data) {
|
||||||
res.nHeight = 0;
|
res.nHeight = 0;
|
||||||
res.strClientV = "";
|
res.strClientV = "";
|
||||||
bool getaddr = res.ourLastSuccess + 86400 < now;
|
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);
|
res.fGood = TestNode(res.service,res.nBanTime,res.nClientV,res.strClientV,res.nHeight,getaddr ? &addr : NULL);
|
||||||
} else {
|
|
||||||
res.fGood = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
db.ResultMany(ips);
|
db.ResultMany(ips);
|
||||||
db.Add(addr);
|
db.Add(addr);
|
||||||
|
@ -394,7 +390,7 @@ extern "C" void* ThreadStats(void*) {
|
||||||
return nullptr;
|
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 testnet_seeds[] = {""};
|
||||||
static const string *seeds = mainnet_seeds;
|
static const string *seeds = mainnet_seeds;
|
||||||
|
|
||||||
|
@ -452,10 +448,10 @@ int main(int argc, char **argv) {
|
||||||
bool fDNS = true;
|
bool fDNS = true;
|
||||||
if (opts.fUseTestNet) {
|
if (opts.fUseTestNet) {
|
||||||
printf("Using testnet.\n");
|
printf("Using testnet.\n");
|
||||||
pchMessageStart[0] = 0x0b;
|
pchMessageStart[0] = 0xf6;
|
||||||
pchMessageStart[1] = 0x11;
|
pchMessageStart[1] = 0x1b;
|
||||||
pchMessageStart[2] = 0x09;
|
pchMessageStart[2] = 0xf6;
|
||||||
pchMessageStart[3] = 0x07;
|
pchMessageStart[3] = 0xd6;
|
||||||
seeds = testnet_seeds;
|
seeds = testnet_seeds;
|
||||||
fTestNet = true;
|
fTestNet = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ static const char* ppszTypeName[] =
|
||||||
"block",
|
"block",
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned char pchMessageStart[4] = { 0x24, 0xe9, 0x27, 0x64 };
|
unsigned char pchMessageStart[4] = { 0xa8, 0xea, 0xa2, 0xcd };
|
||||||
|
|
||||||
CMessageHeader::CMessageHeader()
|
CMessageHeader::CMessageHeader()
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
extern bool fTestNet;
|
extern bool fTestNet;
|
||||||
static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
|
static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
|
||||||
{
|
{
|
||||||
return testnet ? 18033 : 8033;
|
return testnet ? 17933 : 7933;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -60,7 +60,7 @@ class CDataStream;
|
||||||
class CAutoFile;
|
class CAutoFile;
|
||||||
static const unsigned int MAX_SIZE = 0x02000000;
|
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
|
// Used to bypass the rule against non-const reference to temporary
|
||||||
// where it makes sense with wrappers such as CFlatData or CTxDB
|
// where it makes sense with wrappers such as CFlatData or CTxDB
|
||||||
|
|
Loading…
Reference in New Issue