|
|
|
@ -257,7 +257,7 @@ public class EthProtocolManager implements ProtocolManager, MinedBlockObserver { |
|
|
|
|
} else if (!ethPeer.statusHasBeenReceived()) { |
|
|
|
|
// Peers are required to send status messages before any other message type
|
|
|
|
|
LOG.debug( |
|
|
|
|
"{} requires a Status ({}) message to be sent first. Instead, received message {}. Disconnecting from {}.", |
|
|
|
|
"{} requires a Status ({}) message to be sent first. Instead, received message {} (BREACH_OF_PROTOCOL). Disconnecting from {}.", |
|
|
|
|
this.getClass().getSimpleName(), |
|
|
|
|
EthPV62.STATUS, |
|
|
|
|
code, |
|
|
|
@ -277,7 +277,9 @@ public class EthProtocolManager implements ProtocolManager, MinedBlockObserver { |
|
|
|
|
final EthMessage ethMessage = new EthMessage(ethPeer, messageData); |
|
|
|
|
|
|
|
|
|
if (!ethPeer.validateReceivedMessage(ethMessage, getSupportedProtocol())) { |
|
|
|
|
LOG.debug("Unsolicited message received, disconnecting from EthPeer: {}", ethPeer); |
|
|
|
|
LOG.debug( |
|
|
|
|
"Unsolicited message received (BREACH_OF_PROTOCOL), disconnecting from EthPeer: {}", |
|
|
|
|
ethPeer); |
|
|
|
|
ethPeer.disconnect(DisconnectReason.BREACH_OF_PROTOCOL); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -308,7 +310,10 @@ public class EthProtocolManager implements ProtocolManager, MinedBlockObserver { |
|
|
|
|
} |
|
|
|
|
} catch (final RLPException e) { |
|
|
|
|
LOG.debug( |
|
|
|
|
"Received malformed message {} , disconnecting: {}", messageData.getData(), ethPeer, e); |
|
|
|
|
"Received malformed message {} (BREACH_OF_PROTOCOL), disconnecting: {}", |
|
|
|
|
messageData.getData(), |
|
|
|
|
ethPeer, |
|
|
|
|
e); |
|
|
|
|
|
|
|
|
|
ethPeer.disconnect(DisconnectMessage.DisconnectReason.BREACH_OF_PROTOCOL); |
|
|
|
|
} |
|
|
|
|