From fad68afcff731153d1c83f7f56c91ecbb264b59a Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sun, 4 Oct 2020 17:34:26 +0200 Subject: p2p: Ignore non-version msgs before version msg Sending a non-version message before the initial version message is peer misbehavior. Though, it seems arbitrary and confusing to disconnect only after exactly 100 non-version messages. So remove the Misbehaving and instead rely on the existing disconnect-due-to-handshake-timeout logic. --- src/net_processing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net_processing.cpp') diff --git a/src/net_processing.cpp b/src/net_processing.cpp index c649cf7757..df97d0e2e7 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2477,7 +2477,7 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat if (pfrom.nVersion == 0) { // Must have a version message before anything else - Misbehaving(pfrom.GetId(), 1, "non-version message before version handshake"); + LogPrint(BCLog::NET, "non-version message before version handshake. Message \"%s\" from peer=%d\n", SanitizeString(msg_type), pfrom.GetId()); return; } -- cgit v1.2.3