We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
from_hex
to_hex
1 parent 1914054 commit bdb8b9aCopy full SHA for bdb8b9a
test/functional/test_framework/messages.py
@@ -190,8 +190,12 @@ def ser_string_vector(l):
190
return r
191
192
193
-# Deserialize from a hex string representation (eg from RPC)
194
def from_hex(obj, hex_string):
+ """Deserialize from a hex string representation (e.g. from RPC)
195
+
196
+ Note that there is no complementary helper like e.g. `to_hex` for the
197
+ inverse operation. To serialize a message object to a hex string, simply
198
+ use obj.serialize().hex()"""
199
obj.deserialize(BytesIO(hex_str_to_bytes(hex_string)))
200
return obj
201
0 commit comments