cleanup process_packets. don't LogPrintf. It's already been done.
This commit is contained in:
parent
39bc4b9e63
commit
de392ca57c
@ -2008,10 +2008,6 @@ static bool
|
|||||||
process_packets(CNode* pfrom) {
|
process_packets(CNode* pfrom) {
|
||||||
bool fOk = true;
|
bool fOk = true;
|
||||||
|
|
||||||
// if (!pfrom->vRecvGetData.empty()) {
|
|
||||||
// return process_getdata(pfrom);
|
|
||||||
// }
|
|
||||||
|
|
||||||
std::deque<CNetMessage>::iterator it = pfrom->vRecvMsg.begin();
|
std::deque<CNetMessage>::iterator it = pfrom->vRecvMsg.begin();
|
||||||
while (!pfrom->fDisconnect && it != pfrom->vRecvMsg.end()) {
|
while (!pfrom->fDisconnect && it != pfrom->vRecvMsg.end()) {
|
||||||
// Don't bother if send buffer is too full to respond anyway
|
// Don't bother if send buffer is too full to respond anyway
|
||||||
@ -2033,8 +2029,6 @@ process_packets(CNode* pfrom) {
|
|||||||
// Scan for message start
|
// Scan for message start
|
||||||
if (memcmp(msg.hdr.pchMessageStart,
|
if (memcmp(msg.hdr.pchMessageStart,
|
||||||
Params().MessageStart(), MESSAGE_START_SIZE) != 0) {
|
Params().MessageStart(), MESSAGE_START_SIZE) != 0) {
|
||||||
LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n",
|
|
||||||
msg.hdr.GetCommand(), pfrom->id);
|
|
||||||
fOk = false;
|
fOk = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2042,8 +2036,6 @@ process_packets(CNode* pfrom) {
|
|||||||
// Read header
|
// Read header
|
||||||
CMessageHeader& hdr = msg.hdr;
|
CMessageHeader& hdr = msg.hdr;
|
||||||
if (!hdr.IsValid()) {
|
if (!hdr.IsValid()) {
|
||||||
LogPrintf("PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n",
|
|
||||||
hdr.GetCommand(), pfrom->id);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
string strCommand = hdr.GetCommand();
|
string strCommand = hdr.GetCommand();
|
||||||
@ -2057,23 +2049,13 @@ process_packets(CNode* pfrom) {
|
|||||||
unsigned int nChecksum = 0;
|
unsigned int nChecksum = 0;
|
||||||
memcpy(&nChecksum, &hash, sizeof(nChecksum));
|
memcpy(&nChecksum, &hash, sizeof(nChecksum));
|
||||||
if (nChecksum != hdr.nChecksum) {
|
if (nChecksum != hdr.nChecksum) {
|
||||||
LogPrintf(
|
|
||||||
"ProcessMessages(%s, %u bytes) :"
|
|
||||||
" CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n",
|
|
||||||
strCommand, nMessageSize, nChecksum, hdr.nChecksum);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process message
|
// Process message
|
||||||
bool fRet = false;
|
process_packet(pfrom, strCommand, vRecv, msg.nTime);
|
||||||
fRet = process_packet(pfrom, strCommand, vRecv, msg.nTime);
|
|
||||||
boost::this_thread::interruption_point();
|
boost::this_thread::interruption_point();
|
||||||
|
|
||||||
if (!fRet) {
|
|
||||||
LogPrintf("ProcessMessage(%s, %u bytes) FAILED peer=%d\n",
|
|
||||||
strCommand, nMessageSize, pfrom->id);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user