|
|
@ -4824,7 +4824,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, |
|
|
|
pfrom->id, |
|
|
|
pfrom->id, |
|
|
|
FormatStateMessage(state)); |
|
|
|
FormatStateMessage(state)); |
|
|
|
if (state.GetRejectCode() < REJECT_INTERNAL) // Never send AcceptToMemoryPool's internal codes over P2P
|
|
|
|
if (state.GetRejectCode() < REJECT_INTERNAL) // Never send AcceptToMemoryPool's internal codes over P2P
|
|
|
|
pfrom->PushMessage("reject", strCommand, state.GetRejectCode(), |
|
|
|
pfrom->PushMessage("reject", strCommand, (unsigned char)state.GetRejectCode(), |
|
|
|
state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash); |
|
|
|
state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash); |
|
|
|
if (nDoS > 0) |
|
|
|
if (nDoS > 0) |
|
|
|
Misbehaving(pfrom->GetId(), nDoS); |
|
|
|
Misbehaving(pfrom->GetId(), nDoS); |
|
|
@ -4954,7 +4954,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, |
|
|
|
int nDoS; |
|
|
|
int nDoS; |
|
|
|
if (state.IsInvalid(nDoS)) { |
|
|
|
if (state.IsInvalid(nDoS)) { |
|
|
|
assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes
|
|
|
|
assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes
|
|
|
|
pfrom->PushMessage("reject", strCommand, state.GetRejectCode(), |
|
|
|
pfrom->PushMessage("reject", strCommand, (unsigned char)state.GetRejectCode(), |
|
|
|
state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash); |
|
|
|
state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash); |
|
|
|
if (nDoS > 0) { |
|
|
|
if (nDoS > 0) { |
|
|
|
LOCK(cs_main); |
|
|
|
LOCK(cs_main); |
|
|
|