aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-10-01 16:26:42 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-10-04 10:12:55 +0200
commitfbed9c9d6356f86e5507b3fc032f263a17137d57 (patch)
tree83a0dc09ad724689af4bc34675a6dac182a8e1bc /src/main.cpp
parentacb3ebc45506701fdb7e060d8b941a5ba6a1b5ac (diff)
special case DoS value == 0 in ProcessMessage()
- prevents unneeded log messages, which could make users think something bad was happening
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8df288380a..dcf0ee01ae 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3785,8 +3785,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
if (nEvicted > 0)
LogPrint("mempool", "mapOrphan overflow, removed %u tx\n", nEvicted);
}
- int nDoS;
- if (state.IsInvalid(nDoS))
+ int nDoS = 0;
+ if (state.IsInvalid(nDoS) && nDoS > 0)
pfrom->Misbehaving(nDoS);
}
@@ -3805,8 +3805,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
CValidationState state;
if (ProcessBlock(state, pfrom, &block))
mapAlreadyAskedFor.erase(inv);
- int nDoS;
- if (state.IsInvalid(nDoS))
+ int nDoS = 0;
+ if (state.IsInvalid(nDoS) && nDoS > 0)
pfrom->Misbehaving(nDoS);
}