Skip to content

Commit 5fc1700

Browse files
committed
Merge pull request #3064 from Diapolo/style
style-police: fixed badly readable code in ProcessMessage()
2 parents 695a722 + 5ea66c5 commit 5fc1700

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3786,8 +3786,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
37863786
LogPrint("mempool", "mapOrphan overflow, removed %u tx\n", nEvicted);
37873787
}
37883788
int nDoS = 0;
3789-
if (state.IsInvalid(nDoS) && nDoS > 0)
3790-
pfrom->Misbehaving(nDoS);
3789+
if (state.IsInvalid(nDoS))
3790+
if (nDoS > 0)
3791+
pfrom->Misbehaving(nDoS);
37913792
}
37923793

37933794

@@ -3806,8 +3807,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
38063807
if (ProcessBlock(state, pfrom, &block))
38073808
mapAlreadyAskedFor.erase(inv);
38083809
int nDoS = 0;
3809-
if (state.IsInvalid(nDoS) && nDoS > 0)
3810-
pfrom->Misbehaving(nDoS);
3810+
if (state.IsInvalid(nDoS))
3811+
if (nDoS > 0)
3812+
pfrom->Misbehaving(nDoS);
38113813
}
38123814

38133815

0 commit comments

Comments
 (0)