Skip to content

Commit

Permalink
style-police: fixed badly readable code in ProcessMessage()
Browse files Browse the repository at this point in the history
- I introduced the problem and fixed it with better readable code
  • Loading branch information
Philip Kaufmann committed Oct 7, 2013
1 parent 695a722 commit 5ea66c5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3786,8 +3786,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
LogPrint("mempool", "mapOrphan overflow, removed %u tx\n", nEvicted);
}
int nDoS = 0;
if (state.IsInvalid(nDoS) && nDoS > 0)
pfrom->Misbehaving(nDoS);
if (state.IsInvalid(nDoS))
if (nDoS > 0)
pfrom->Misbehaving(nDoS);
}


Expand All @@ -3806,8 +3807,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
if (ProcessBlock(state, pfrom, &block))
mapAlreadyAskedFor.erase(inv);
int nDoS = 0;
if (state.IsInvalid(nDoS) && nDoS > 0)
pfrom->Misbehaving(nDoS);
if (state.IsInvalid(nDoS))
if (nDoS > 0)
pfrom->Misbehaving(nDoS);
}


Expand Down

0 comments on commit 5ea66c5

Please sign in to comment.