mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-12 12:53:31 +02:00
[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 ```
This commit is contained in:
parent
7eb7076f70
commit
fad63ebe0f
@ -1571,6 +1571,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|||||||
LogPrint(BCLog::NET, "Unparseable reject message received\n");
|
LogPrint(BCLog::NET, "Unparseable reject message received\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (strCommand == NetMsgType::VERSION)
|
else if (strCommand == NetMsgType::VERSION)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user