Skip to content

Commit

Permalink
qa: Remove unused deserialization code in msg_version
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoFalke committed Aug 23, 2018
1 parent fa5099c commit fa74d3d
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions test/functional/test_framework/messages.py
Expand Up @@ -909,21 +909,12 @@ def deserialize(self, f):
self.addrTo = CAddress()
self.addrTo.deserialize(f, False)

if self.nVersion >= 106:
self.addrFrom = CAddress()
self.addrFrom.deserialize(f, False)
self.nNonce = struct.unpack("<Q", f.read(8))[0]
self.strSubVer = deser_string(f)
else:
self.addrFrom = None
self.nNonce = None
self.strSubVer = None
self.nStartingHeight = None
self.addrFrom = CAddress()
self.addrFrom.deserialize(f, False)
self.nNonce = struct.unpack("<Q", f.read(8))[0]
self.strSubVer = deser_string(f)

if self.nVersion >= 209:
self.nStartingHeight = struct.unpack("<i", f.read(4))[0]
else:
self.nStartingHeight = None
self.nStartingHeight = struct.unpack("<i", f.read(4))[0]

if self.nVersion >= 70001:
# Relay field is optional for version 70001 onwards
Expand Down

0 comments on commit fa74d3d

Please sign in to comment.