cleanup.
This commit is contained in:
parent
1fd4c0ba4f
commit
99abd06b87
@ -291,9 +291,6 @@ process_packets(CNode* pfrom);
|
|||||||
static bool
|
static bool
|
||||||
process_packet(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived);
|
process_packet(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived);
|
||||||
|
|
||||||
// bool static
|
|
||||||
// process_getdata(CNode* pfrom);
|
|
||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
init(Handle<Object>);
|
init(Handle<Object>);
|
||||||
|
|
||||||
@ -3884,8 +3881,10 @@ process_packets(CNode* pfrom) {
|
|||||||
it++;
|
it++;
|
||||||
|
|
||||||
// Scan for message start
|
// Scan for message start
|
||||||
if (memcmp(msg.hdr.pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE) != 0) {
|
if (memcmp(msg.hdr.pchMessageStart,
|
||||||
LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", msg.hdr.GetCommand(), pfrom->id);
|
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;
|
||||||
}
|
}
|
||||||
@ -3893,7 +3892,8 @@ 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);
|
LogPrintf("PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n",
|
||||||
|
hdr.GetCommand(), pfrom->id);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
string strCommand = hdr.GetCommand();
|
string strCommand = hdr.GetCommand();
|
||||||
@ -3907,7 +3907,9 @@ 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",
|
LogPrintf(
|
||||||
|
"ProcessMessages(%s, %u bytes) :"
|
||||||
|
" CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n",
|
||||||
strCommand, nMessageSize, nChecksum, hdr.nChecksum);
|
strCommand, nMessageSize, nChecksum, hdr.nChecksum);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -3917,8 +3919,10 @@ process_packets(CNode* pfrom) {
|
|||||||
fRet = 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)
|
if (!fRet) {
|
||||||
LogPrintf("ProcessMessage(%s, %u bytes) FAILED peer=%d\n", strCommand, nMessageSize, pfrom->id);
|
LogPrintf("ProcessMessage(%s, %u bytes) FAILED peer=%d\n",
|
||||||
|
strCommand, nMessageSize, pfrom->id);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4014,11 +4018,6 @@ process_packet(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTim
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// bool static
|
|
||||||
// process_getdata(CNode* pfrom) {
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init()
|
* Init()
|
||||||
* Initialize the singleton object known as bitcoindjs.
|
* Initialize the singleton object known as bitcoindjs.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user