Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 3,458 Lines • ▼ Show 20 Lines | if (msg_type == NetMsgType::VERSION) { | ||||
ServiceFlags nServices; | ServiceFlags nServices; | ||||
int nVersion; | int nVersion; | ||||
std::string cleanSubVer; | std::string cleanSubVer; | ||||
int starting_height = -1; | int starting_height = -1; | ||||
bool fRelay = true; | bool fRelay = true; | ||||
uint64_t nExtraEntropy = 1; | uint64_t nExtraEntropy = 1; | ||||
vRecv >> nVersion >> nServiceInt >> nTime >> addrMe; | vRecv >> nVersion >> nServiceInt >> nTime >> addrMe; | ||||
if (nTime < 0) { | |||||
nTime = 0; | |||||
} | |||||
nServices = ServiceFlags(nServiceInt); | nServices = ServiceFlags(nServiceInt); | ||||
if (!pfrom.IsInboundConn()) { | if (!pfrom.IsInboundConn()) { | ||||
m_connman.SetServices(pfrom.addr, nServices); | m_connman.SetServices(pfrom.addr, nServices); | ||||
} | } | ||||
if (pfrom.ExpectServicesFromConn() && | if (pfrom.ExpectServicesFromConn() && | ||||
!HasAllDesirableServiceFlags(nServices)) { | !HasAllDesirableServiceFlags(nServices)) { | ||||
LogPrint(BCLog::NET, | LogPrint(BCLog::NET, | ||||
"peer=%d does not offer the expected services " | "peer=%d does not offer the expected services " | ||||
▲ Show 20 Lines • Show All 3,655 Lines • Show Last 20 Lines |