mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
refactor: make Transport::ReceivedBytes just return success/fail
This commit is contained in:
@@ -690,9 +690,8 @@ bool CNode::ReceiveMsgBytes(Span<const uint8_t> msg_bytes, bool& complete)
|
||||
nRecvBytes += msg_bytes.size();
|
||||
while (msg_bytes.size() > 0) {
|
||||
// absorb network data
|
||||
int handled = m_transport->ReceivedBytes(msg_bytes);
|
||||
if (handled < 0) {
|
||||
// Serious header problem, disconnect from the peer.
|
||||
if (!m_transport->ReceivedBytes(msg_bytes)) {
|
||||
// Serious transport problem, disconnect from the peer.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user