From 7228d918f6b62e6241ab3e09ef793305c5859b0c Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Mon, 19 Sep 2022 16:04:20 +0700 Subject: [PATCH] fix(tests): fix for default initialization of structures in messages.py (#5008) Excepted zeroes in non-initialized data, in-fact there are non-zero characters. >>> print(b'\\x0'.hex()) 5c7830 >>> print(b'\x00'.hex()) 00 --- test/functional/test_framework/messages.py | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index c05bf0555c..0c418f9323 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -1079,7 +1079,7 @@ class CSimplifiedMNListEntry: self.proRegTxHash = 0 self.confirmedHash = 0 self.service = CService() - self.pubKeyOperator = b'\\x0' * 48 + self.pubKeyOperator = b'\x00' * 48 self.keyIDVoting = 0 self.isValid = False @@ -1116,10 +1116,10 @@ class CFinalCommitment: self.quorumIndex = 0 self.signers = [] self.validMembers = [] - self.quorumPublicKey = b'\\x0' * 48 + self.quorumPublicKey = b'\x00' * 48 self.quorumVvecHash = 0 - self.quorumSig = b'\\x0' * 96 - self.membersSig = b'\\x0' * 96 + self.quorumSig = b'\x00' * 96 + self.membersSig = b'\x00' * 96 def deserialize(self, f): self.nVersion = struct.unpack("