There are still many functional tests that perform conversions from a hex-string to a message object (deserialization) manually. This PR identifies all those instances and replaces them with a newly introduced helper tx_from_hex
.
Instances were found via
git grep "deserialize.*BytesIO"
and some of them manually, when it were not one-liners.
Further, the helper ToHex
was removed and simply replaced by .serialize().hex()
, since now both variants are in use (sometimes even within the same test) and using the helper doesn’t really have an advantage in readability. (see discussion #22257 (review))