From 56212e20acf1534d443cb910c9bf3a30f84d0f02 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Sat, 31 Dec 2016 02:05:15 -0500 Subject: net: set message deserialization version when it's actually time to deserialize We'll soon no longer have access to vRecvMsg, and this is more intuitive anyway. --- 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 3d38995c5..556975d14 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2485,6 +2485,7 @@ bool ProcessMessages(CNode* pfrom, CConnman& connman, std::atomic& interru // at this point, any failure means we can delete the current message it++; + msg.SetVersion(pfrom->GetRecvVersion()); // Scan for message start if (memcmp(msg.hdr.pchMessageStart, chainparams.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0) { LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", SanitizeString(msg.hdr.GetCommand()), pfrom->id); -- cgit v1.2.3