Browse Source

special case DoS value == 0 in ProcessMessage()

- prevents unneeded log messages, which could make users think something
  bad was happening

Squashed: style-police code cleanup
0.8
Philip Kaufmann 11 years ago committed by Warren Togami
parent
commit
3cb290066e
  1. 6
      src/main.cpp

6
src/main.cpp

@ -3582,8 +3582,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) @@ -3582,8 +3582,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
if (nEvicted > 0)
printf("mapOrphan overflow, removed %u tx\n", nEvicted);
}
int nDoS;
int nDoS = 0;
if (state.IsInvalid(nDoS))
if (nDoS > 0)
pfrom->Misbehaving(nDoS);
}
@ -3602,8 +3603,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) @@ -3602,8 +3603,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
CValidationState state;
if (ProcessBlock(state, pfrom, &block))
mapAlreadyAskedFor.erase(inv);
int nDoS;
int nDoS = 0;
if (state.IsInvalid(nDoS))
if (nDoS > 0)
pfrom->Misbehaving(nDoS);
}

Loading…
Cancel
Save