Changeset View
Changeset View
Standalone View
Standalone View
src/seeder/test/p2p_messaging_tests.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
BOOST_FIXTURE_TEST_SUITE(p2p_messaging_tests, SeederTestingSetup) | BOOST_FIXTURE_TEST_SUITE(p2p_messaging_tests, SeederTestingSetup) | ||||
static CDataStream | static CDataStream | ||||
CreateVersionMessage(int64_t now, CAddress addrTo, CAddress addrFrom, | CreateVersionMessage(int64_t now, CAddress addrTo, CAddress addrFrom, | ||||
int32_t start_height, uint32_t nVersion, | int32_t start_height, uint32_t nVersion, | ||||
uint64_t nonce = 0, | uint64_t nonce = 0, | ||||
std::string user_agent = "/bitcoin-cash-seeder:0.15/") { | std::string user_agent = "/Bitcoin ABC:0.0.0(seeder)/") { | ||||
CDataStream payload(SER_NETWORK, 0); | CDataStream payload(SER_NETWORK, 0); | ||||
payload.SetVersion(nVersion); | payload.SetVersion(nVersion); | ||||
ServiceFlags serviceflags = ServiceFlags(NODE_NETWORK); | ServiceFlags serviceflags = ServiceFlags(NODE_NETWORK); | ||||
payload << nVersion << uint64_t(serviceflags) << now << addrTo << addrFrom | payload << nVersion << uint64_t(serviceflags) << now << addrTo << addrFrom | ||||
<< nonce << user_agent << start_height; | << nonce << user_agent << start_height; | ||||
return payload; | return payload; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |