diff options
author | Troy Giorshev <troygiorshev@gmail.com> | 2020-07-22 08:59:16 -0400 |
---|---|---|
committer | Troy Giorshev <troygiorshev@gmail.com> | 2021-01-17 20:31:02 -0500 |
commit | dbf779d5deb04f55c6e8493ce4e12ed4628638f3 (patch) | |
tree | 31b8a0eecda150e8642fff61b653dc4435c0ab5e /src/net_processing.cpp | |
parent | bc51b99bd5e99a4828a5f759b21ae911aef461e5 (diff) |
Clean PushMessage and ProcessMessages
This brings PushMessage and ProcessMessages further in line with the
style guide by fixing their if statements.
LogMessage is later called, inside an if statement, inside both of these
methods.
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index cf73b1dae2..7d89d3ea6e 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -4028,14 +4028,12 @@ bool PeerManagerImpl::ProcessMessages(CNode* pfrom, std::atomic<bool>& interrupt } // Don't bother if send buffer is too full to respond anyway - if (pfrom->fPauseSend) - return false; + if (pfrom->fPauseSend) return false; std::list<CNetMessage> msgs; { LOCK(pfrom->cs_vProcessMsg); - if (pfrom->vProcessMsg.empty()) - return false; + if (pfrom->vProcessMsg.empty()) return false; // Just take one message msgs.splice(msgs.begin(), pfrom->vProcessMsg, pfrom->vProcessMsg.begin()); pfrom->nProcessQueueSize -= msgs.front().m_raw_message_size; |