diff --git a/test/functional/rawtransactions.py b/test/functional/rawtransactions.py index 116b6ab4b..13c34c74e 100755 --- a/test/functional/rawtransactions.py +++ b/test/functional/rawtransactions.py @@ -1,6 +1,3 @@ - - - #!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py index 2bb7ab6f1..9989fb492 100755 --- a/test/functional/test_framework/mininode.py +++ b/test/functional/test_framework/mininode.py @@ -434,7 +434,7 @@ class CTransaction(object): self.nLockTime = 0 self.sha256 = None self.hash = None - self.txComment = "" + self.txComment = b"" else: self.nVersion = tx.nVersion self.vin = copy.deepcopy(tx.vin) @@ -443,7 +443,7 @@ class CTransaction(object): self.sha256 = tx.sha256 self.hash = tx.hash self.wit = copy.deepcopy(tx.wit) - self.txComment = '%s' % tx.txComment + self.txComment = b'%s' % tx.txComment def deserialize(self, f): self.nVersion = struct.unpack("= 2: - tx_comment_len = deser_compact_size(f) - if tx_comment_len > 0: - self.txComment = struct.unpack("= 2: - r += ser_compact_size(len(self.txComment)) - if len(self.txComment) > 0: - r += struct.pack("= 2: - r += ser_compact_size(len(self.txComment)) - if len(self.txComment) > 0: - r += struct.pack("= 2: - ss += ser_compact_size(len(txTo.txComment)) - if len(txTo.txComment) > 0: - ss += struct.pack("