aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-06-17 17:43:02 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-06-21 14:36:02 +0200
commitbdb8b9a347e68f80a2e8d44ce5590a2e8214b6bb (patch)
tree44c20c0c5f798681b66ea0d82c4f44df27c7fc3d /test/functional
parent191405420815d49ab50184513717a303fc2744d6 (diff)
test: doc: improve doc for `from_hex` helper (mention `to_hex` alternative)
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/test_framework/messages.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py
index a0e1a6bc12..504c8c70d4 100755
--- a/test/functional/test_framework/messages.py
+++ b/test/functional/test_framework/messages.py
@@ -190,8 +190,12 @@ def ser_string_vector(l):
return r
-# Deserialize from a hex string representation (eg from RPC)
def from_hex(obj, hex_string):
+ """Deserialize from a hex string representation (e.g. from RPC)
+
+ Note that there is no complementary helper like e.g. `to_hex` for the
+ inverse operation. To serialize a message object to a hex string, simply
+ use obj.serialize().hex()"""
obj.deserialize(BytesIO(hex_str_to_bytes(hex_string)))
return obj