-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Anthony Fieroni <[email protected]>
- Loading branch information
Showing
2 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3512,17 +3512,15 @@ bool PeerLogicValidation::ProcessMessages(CNode* pfrom, std::atomic<bool>& inter | |
|
||
msg.SetVersion(pfrom->GetRecvVersion()); | ||
// Scan for message start | ||
if (memcmp(msg.hdr.pchMessageStart, chainparams.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0 && | ||
memcmp(msg.hdr.pchMessageStart, chainparams.MessageStartPostAMK(), CMessageHeader::MESSAGE_START_SIZE) != 0) { | ||
if (memcmp(msg.hdr.pchMessageStart, chainparams.MessageStartPostAMK(), CMessageHeader::MESSAGE_START_SIZE) != 0) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bvbfan
Author
Contributor
|
||
LogPrint(BCLog::NET, "PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", SanitizeString(msg.hdr.GetCommand()), pfrom->GetId()); | ||
pfrom->fDisconnect = true; | ||
return false; | ||
} | ||
|
||
// Read header | ||
CMessageHeader& hdr = msg.hdr; | ||
if (!hdr.IsValid(chainparams.MessageStart()) && !hdr.IsValid(chainparams.MessageStartPostAMK())) | ||
{ | ||
if (!hdr.IsValid(chainparams.MessageStartPostAMK())) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
LogPrint(BCLog::NET, "PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n", SanitizeString(hdr.GetCommand()), pfrom->GetId()); | ||
return fMoreWork; | ||
} | ||
|
I think here we still need to accept old message until we transition to everyone sending new message