From fad63ebe0f0db1e1d909064665be91ebd970bb0a Mon Sep 17 00:00:00 2001 From: John Newbery Date: Thu, 3 May 2018 13:41:03 -0400 Subject: [logging] Don't incorrectly log that REJECT messages are unknown. Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ``` --- src/net_processing.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/net_processing.cpp') diff --git a/src/net_processing.cpp b/src/net_processing.cpp index cc819a01c3..545b7e171d 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1571,6 +1571,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr LogPrint(BCLog::NET, "Unparseable reject message received\n"); } } + return true; } else if (strCommand == NetMsgType::VERSION) -- cgit v1.2.3