bitcoin/test/functional/test_framework
MarcoFalke d6a59166a1
Merge bitcoin/bitcoin#22257: test: refactor: various (de)serialization helpers cleanups/improvements
bdb8b9a347 test: doc: improve doc for `from_hex` helper (mention `to_hex` alternative) (Sebastian Falbesoner)
1914054208 scripted-diff: test: rename `FromHex` to `from_hex` (Sebastian Falbesoner)
a79396fe5f test: remove `ToHex` helper, use .serialize().hex() instead (Sebastian Falbesoner)
2ce7b47958 test: introduce `tx_from_hex` helper for tx deserialization (Sebastian Falbesoner)

Pull request description:

  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 https://github.com/bitcoin/bitcoin/pull/22257#discussion_r652404782)

ACKs for top commit:
  MarcoFalke:
    review re-ACK bdb8b9a347 😁

Tree-SHA512: e25d7dc85918de1d6755a5cea65471b07a743204c20ad1c2f71ff07ef48cc1b9ad3fe5f515c1efaba2b2e3d89384e7980380c5d81895f9826e2046808cd3266e
2021-06-24 12:47:13 +02:00
..
__init__.py
address.py
authproxy.py
bdb.py
bip340_test_vectors.csv
blocktools.py Merge bitcoin/bitcoin#22257: test: refactor: various (de)serialization helpers cleanups/improvements 2021-06-24 12:47:13 +02:00
coverage.py
descriptors.py
key.py
messages.py test: doc: improve doc for `from_hex` helper (mention `to_hex` alternative) 2021-06-21 14:36:02 +02:00
muhash.py
netutil.py test: Fix IPv6 check on BSD systems 2021-05-30 23:47:50 +02:00
p2p.py test: Fix intermittent issue in p2p_addr_relay.py 2021-04-28 08:16:29 +02:00
script.py
script_util.py
segwit_addr.py
siphash.py
socks5.py
test_framework.py add dummy file param to fix jupyter 2021-06-21 17:12:16 +02:00
test_node.py test: convert docs into type annotations in test_framework/test_node.py 2021-06-03 20:45:03 +08:00
test_shell.py
util.py test: introduce `tx_from_hex` helper for tx deserialization 2021-06-21 14:28:05 +02:00
wallet.py Merge bitcoin/bitcoin#22089: test: MiniWallet: fix fee calculation for P2PK and check tx vsize 2021-06-21 16:11:13 +02:00
wallet_util.py