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