Changeset View
Changeset View
Standalone View
Standalone View
src/seeder/bitcoin.cpp
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | class CNode { | ||||
void PushVersion() { | void PushVersion() { | ||||
int64_t nTime = time(nullptr); | int64_t nTime = time(nullptr); | ||||
uint64_t nLocalNonce = BITCOIN_SEED_NONCE; | uint64_t nLocalNonce = BITCOIN_SEED_NONCE; | ||||
int64_t nLocalServices = 0; | int64_t nLocalServices = 0; | ||||
CAddress me(CService("0.0.0.0")); | CAddress me(CService("0.0.0.0")); | ||||
BeginMessage("version"); | BeginMessage("version"); | ||||
int nBestHeight = GetRequireHeight(); | int nBestHeight = GetRequireHeight(); | ||||
std::string ver = "/bitcoin-seeder:0.01/"; | std::string ver = "/bitcoin-cash-seeder:0.15/"; | ||||
vSend << PROTOCOL_VERSION << nLocalServices << nTime << you << me | vSend << PROTOCOL_VERSION << nLocalServices << nTime << you << me | ||||
<< nLocalNonce << ver << nBestHeight; | << nLocalNonce << ver << nBestHeight; | ||||
EndMessage(); | EndMessage(); | ||||
} | } | ||||
void GotVersion() { | void GotVersion() { | ||||
// printf("\n%s: version %i\n", ToString(you).c_str(), nVersion); | // printf("\n%s: version %i\n", ToString(you).c_str(), nVersion); | ||||
if (vAddr) { | if (vAddr) { | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |