aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-10-07 08:55:04 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-10-07 08:55:04 +0200
commit5ea66c54fb210a53a6d0f639b8bbd240670bf128 (patch)
tree2990534589a0a8550a78fc4606ae592e34bb3902 /src/main.cpp
parent695a722003a2565f79cc337668e52d5c941fde10 (diff)
downloadbitcoin-5ea66c54fb210a53a6d0f639b8bbd240670bf128.tar.xz
style-police: fixed badly readable code in ProcessMessage()
- I introduced the problem and fixed it with better readable code
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index dcf0ee01ae..ed40a3550a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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);
}
@@ -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);
}