From fa5099ceb757c9d56fa54a08d0441750df6c8869 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 22 Aug 2018 09:24:43 -0400 Subject: [PATCH 1/2] p2p: Remove dead code for nVersion=10300 --- src/net_processing.cpp | 5 +---- test/functional/test_framework/messages.py | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 88999ba73..0fad01225 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1662,8 +1662,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr return false; } - if (nVersion < MIN_PEER_PROTO_VERSION) - { + if (nVersion < MIN_PEER_PROTO_VERSION) { // disconnect from peers older than this proto version LogPrint(BCLog::NET, "peer=%d using obsolete version %i; disconnecting\n", pfrom->GetId(), nVersion); if (enable_bip61) { @@ -1674,8 +1673,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr return false; } - if (nVersion == 10300) - nVersion = 300; if (!vRecv.empty()) vRecv >> addrFrom >> nNonce; if (!vRecv.empty()) { diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 7276f6b45..3cd148a02 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -904,8 +904,6 @@ class msg_version(): def deserialize(self, f): self.nVersion = struct.unpack(" Date: Thu, 23 Aug 2018 10:10:13 -0400 Subject: [PATCH 2/2] qa: Remove unused deserialization code in msg_version --- test/functional/test_framework/messages.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 3cd148a02..0a3907cba 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -909,21 +909,12 @@ class msg_version(): self.addrTo = CAddress() self.addrTo.deserialize(f, False) - if self.nVersion >= 106: - self.addrFrom = CAddress() - self.addrFrom.deserialize(f, False) - self.nNonce = struct.unpack("= 209: - self.nStartingHeight = struct.unpack("= 70001: # Relay field is optional for version 70001 onwards