aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-05-03 13:41:03 -0400
committerJohn Newbery <john@johnnewbery.com>2018-05-03 13:41:03 -0400
commitfad63ebe0f0db1e1d909064665be91ebd970bb0a (patch)
tree9bef3b0d0e1d49fb68e26e70a4caaa6defa7bd9f /src
parent7eb7076f70078c06bef9752f22acf92fd86e616a (diff)
downloadbitcoin-fad63ebe0f0db1e1d909064665be91ebd970bb0a.tar.xz
[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 ```
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp1
1 files changed, 1 insertions, 0 deletions
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)