mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
special case DoS value == 0 in ProcessMessage()
- prevents unneeded log messages, which could make users think something bad was happening Squashed: style-police code cleanup
This commit is contained in:
parent
25c4b8732c
commit
3cb290066e
10
src/main.cpp
10
src/main.cpp
@ -3582,9 +3582,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
|||||||
if (nEvicted > 0)
|
if (nEvicted > 0)
|
||||||
printf("mapOrphan overflow, removed %u tx\n", nEvicted);
|
printf("mapOrphan overflow, removed %u tx\n", nEvicted);
|
||||||
}
|
}
|
||||||
int nDoS;
|
int nDoS = 0;
|
||||||
if (state.IsInvalid(nDoS))
|
if (state.IsInvalid(nDoS))
|
||||||
pfrom->Misbehaving(nDoS);
|
if (nDoS > 0)
|
||||||
|
pfrom->Misbehaving(nDoS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3602,9 +3603,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
|||||||
CValidationState state;
|
CValidationState state;
|
||||||
if (ProcessBlock(state, pfrom, &block))
|
if (ProcessBlock(state, pfrom, &block))
|
||||||
mapAlreadyAskedFor.erase(inv);
|
mapAlreadyAskedFor.erase(inv);
|
||||||
int nDoS;
|
int nDoS = 0;
|
||||||
if (state.IsInvalid(nDoS))
|
if (state.IsInvalid(nDoS))
|
||||||
pfrom->Misbehaving(nDoS);
|
if (nDoS > 0)
|
||||||
|
pfrom->Misbehaving(nDoS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user