Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 1,676 Lines • ▼ Show 20 Lines | static bool ProcessMessage(const Config &config, CNode *pfrom, | ||||
else if (!pfrom->fSuccessfullyConnected) { | else if (!pfrom->fSuccessfullyConnected) { | ||||
// Must have a verack message before anything else | // Must have a verack message before anything else | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
Misbehaving(pfrom, 1, "missing-verack"); | Misbehaving(pfrom, 1, "missing-verack"); | ||||
return false; | return false; | ||||
} | } | ||||
else if (strCommand == NetMsgType::ADDR) { | else if (strCommand == NetMsgType::ADDR) { | ||||
// We don't want addr from non-Cash peers if we're on the Cash chain | |||||
// already. | |||||
if (!(pfrom->nServices & NODE_BITCOIN_CASH) && fActiveChainTipIsUAHF) { | |||||
return true; | |||||
} | |||||
std::vector<CAddress> vAddr; | std::vector<CAddress> vAddr; | ||||
vRecv >> vAddr; | vRecv >> vAddr; | ||||
// Don't want addr from older versions unless seeding | // Don't want addr from older versions unless seeding | ||||
if (pfrom->nVersion < CADDR_TIME_VERSION && | if (pfrom->nVersion < CADDR_TIME_VERSION && | ||||
connman.GetAddressCount() > 1000) { | connman.GetAddressCount() > 1000) { | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 2,164 Lines • Show Last 20 Lines |