diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-07-31 21:23:16 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-08-01 19:26:51 +0200 |
commit | ca6c154ef116e8d2e0484cdb1af13b34a0c86c17 (patch) | |
tree | 4b38a878a5b2fd0f49a2cc0b0e1948b8119b40e9 /test/functional/feature_dbcrash.py | |
parent | f2e41d11097dde1c841bcaa8615886c984f71632 (diff) |
test: refactor: remove `hex_str_to_bytes` helper
Use the built-in class method bytes.fromhex() instead,
which is available since Python 3.0.
Diffstat (limited to 'test/functional/feature_dbcrash.py')
-rwxr-xr-x | test/functional/feature_dbcrash.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/feature_dbcrash.py b/test/functional/feature_dbcrash.py index c532300ce2..6d8e5430f8 100755 --- a/test/functional/feature_dbcrash.py +++ b/test/functional/feature_dbcrash.py @@ -41,7 +41,6 @@ from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, create_confirmed_utxos, - hex_str_to_bytes, ) @@ -204,7 +203,7 @@ class ChainstateWriteCrashTest(BitcoinTestFramework): continue for _ in range(3): - tx.vout.append(CTxOut(output_amount, hex_str_to_bytes(utxo['scriptPubKey']))) + tx.vout.append(CTxOut(output_amount, bytes.fromhex(utxo['scriptPubKey']))) # Sign and send the transaction to get into the mempool tx_signed_hex = node.signrawtransactionwithwallet(tx.serialize().hex())['hex'] |