mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-27 17:12:35 +02:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user