From 37a934e6b35bea2125732d2c074998d9fe70633e Mon Sep 17 00:00:00 2001 From: John Newbery Date: Fri, 10 Jul 2020 16:48:20 +0100 Subject: [protocol] Remove unused CADDR_TIME_VERSION Add comments to CAddress serialization code explaining why it's no longer needed. --- test/functional/test_framework/messages.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'test/functional/test_framework/messages.py') diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index eb1244035f..12302cdbc3 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -207,17 +207,19 @@ class CAddress: self.ip = "0.0.0.0" self.port = 0 - def deserialize(self, f, with_time=True): + def deserialize(self, f, *, with_time=True): if with_time: + # VERSION messages serialize CAddress objects without time self.time = struct.unpack("H", f.read(2))[0] - def serialize(self, with_time=True): + def serialize(self, *, with_time=True): r = b"" if with_time: + # VERSION messages serialize CAddress objects without time r += struct.pack("