aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
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 726a49c611..fa7372d69f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3581,9 +3581,10 @@ 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))
- pfrom->Misbehaving(nDoS);
+ if (nDoS > 0)
+ pfrom->Misbehaving(nDoS);
}
@@ -3601,9 +3602,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
CValidationState state;
if (ProcessBlock(state, pfrom, &block) || state.CorruptionPossible())
mapAlreadyAskedFor.erase(inv);
- int nDoS;
+ int nDoS = 0;
if (state.IsInvalid(nDoS))
- pfrom->Misbehaving(nDoS);
+ if (nDoS > 0)
+ pfrom->Misbehaving(nDoS);
}