diff options
-rwxr-xr-x | test/functional/test_framework/messages.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 1e15113d88..c5050c0e6a 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -399,12 +399,12 @@ class CBlockLocator: self.vHave = [] def deserialize(self, f): - struct.unpack("<i", f.read(4))[0] # Ignore version field. + int.from_bytes(f.read(4), "little", signed=True) # Ignore version field. self.vHave = deser_uint256_vector(f) def serialize(self): r = b"" - r += struct.pack("<i", 0) # Bitcoin Core ignores version field. Set it to 0. + r += (0).to_bytes(4, "little", signed=True) # Bitcoin Core ignores the version field. Set it to 0. r += ser_uint256_vector(self.vHave) return r |