From fa3886b7c69cbbe564478f30bb2c35e9e6b1cffa Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 12 Dec 2023 17:57:00 +0100 Subject: [PATCH] test: Treat msg_version.relay as unsigned The C++ code treats bool as uint8_t, so the python tests should as well. This also allows to simplify the code, because converting an empty byte array to int gives int(0). >>> int.from_bytes(b'') 0 --- test/functional/test_framework/messages.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index d008cb39aa2..1e15113d886 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -1132,10 +1132,7 @@ class msg_version: # Relay field is optional for version 70001 onwards # But, unconditionally check it to match behaviour in bitcoind - try: - self.relay = struct.unpack("