mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-19 20:20:00 +01:00
Remove oversized message detection from log and interface
This commit is contained in:
committed by
Jonas Schnelli
parent
b0e10ff4df
commit
6a91499496
11
src/net.cpp
11
src/net.cpp
@@ -577,12 +577,6 @@ bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes, bool& complete
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_deserializer->OversizedMessageDetected()) {
|
||||
LogPrint(BCLog::NET, "Oversized message from peer=%i, disconnecting\n", GetId());
|
||||
m_deserializer->Reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
pch += handled;
|
||||
nBytes -= handled;
|
||||
|
||||
@@ -655,9 +649,10 @@ int V1TransportDeserializer::readHeader(const char *pch, unsigned int nBytes)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// reject messages larger than MAX_SIZE
|
||||
if (hdr.nMessageSize > MAX_SIZE)
|
||||
// reject messages larger than MAX_SIZE or MAX_PROTOCOL_MESSAGE_LENGTH
|
||||
if (hdr.nMessageSize > MAX_SIZE || hdr.nMessageSize > MAX_PROTOCOL_MESSAGE_LENGTH) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// switch state to reading message data
|
||||
in_data = true;
|
||||
|
||||
Reference in New Issue
Block a user