mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
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.
This commit is contained in:
parent
ea7926527c
commit
fad68afcff
3 changed files with 6 additions and 21 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue