Skip to content

Commit

Permalink
[Test] move framework subversion to string
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Jun 28, 2021
1 parent 3472a39 commit c02e9a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/functional/test_framework/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

MIN_VERSION_SUPPORTED = 60001
MY_VERSION = 70922
MY_SUBVERSION = b"/python-mininode-tester:0.0.3/"
MY_SUBVERSION = "/python-mininode-tester:0.0.3/"
MY_RELAY = 1 # from version 70001 onwards, fRelay should be appended to version messages (BIP37)

MAX_INV_SZ = 50000
Expand Down Expand Up @@ -927,7 +927,7 @@ def deserialize(self, f):
self.addrFrom = CAddress()
self.addrFrom.deserialize(f)
self.nNonce = struct.unpack("<Q", f.read(8))[0]
self.strSubVer = deser_string(f)
self.strSubVer = deser_string(f).decode('utf-8')
else:
self.addrFrom = None
self.nNonce = None
Expand Down Expand Up @@ -956,7 +956,7 @@ def serialize(self):
r += self.addrTo.serialize()
r += self.addrFrom.serialize()
r += struct.pack("<Q", self.nNonce)
r += ser_string(self.strSubVer)
r += ser_string(self.strSubVer.encode('utf-8'))
r += struct.pack("<i", self.nStartingHeight)
r += struct.pack("<b", self.nRelay)
return r
Expand Down

0 comments on commit c02e9a0

Please sign in to comment.