Changeset View
Changeset View
Standalone View
Standalone View
src/net_processing.cpp
Show First 20 Lines • Show All 3,122 Lines • ▼ Show 20 Lines | std::list<CNetMessage> msgs; | ||||
pfrom->nProcessQueueSize > connman.GetReceiveFloodSize(); | pfrom->nProcessQueueSize > connman.GetReceiveFloodSize(); | ||||
fMoreWork = !pfrom->vProcessMsg.empty(); | fMoreWork = !pfrom->vProcessMsg.empty(); | ||||
} | } | ||||
CNetMessage &msg(msgs.front()); | CNetMessage &msg(msgs.front()); | ||||
msg.SetVersion(pfrom->GetRecvVersion()); | msg.SetVersion(pfrom->GetRecvVersion()); | ||||
// Scan for message start | // Scan for message start | ||||
if (memcmp(msg.hdr.pchMessageStart, chainparams.NetMagic(), | if (memcmp(std::begin(msg.hdr.pchMessageStart), | ||||
std::begin(chainparams.NetMagic()), | |||||
CMessageHeader::MESSAGE_START_SIZE) != 0) { | CMessageHeader::MESSAGE_START_SIZE) != 0) { | ||||
LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", | LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", | ||||
SanitizeString(msg.hdr.GetCommand()), pfrom->id); | SanitizeString(msg.hdr.GetCommand()), pfrom->id); | ||||
pfrom->fDisconnect = true; | pfrom->fDisconnect = true; | ||||
return false; | return false; | ||||
} | } | ||||
// Read header | // Read header | ||||
▲ Show 20 Lines • Show All 696 Lines • Show Last 20 Lines |