diff options
| author | Gavin Andresen <[email protected]> | 2013-10-04 04:08:43 -0700 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2013-10-04 04:08:43 -0700 |
| commit | 15b48ab03612952b355cdd411cc541668d147bfb (patch) | |
| tree | 83a0dc09ad724689af4bc34675a6dac182a8e1bc /src/main.cpp | |
| parent | Merge pull request #2947 from gmaxwell/theyre_maturing_faster_these_days (diff) | |
| parent | special case DoS value == 0 in ProcessMessage() (diff) | |
| download | discoin-15b48ab03612952b355cdd411cc541668d147bfb.tar.xz discoin-15b48ab03612952b355cdd411cc541668d147bfb.zip | |
Merge pull request #3047 from Diapolo/misbehave
special case DoS value == 0
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 8df288380..dcf0ee01a 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); } |