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/interface_rest.py | |
parent | f2e41d11097dde1c841bcaa8615886c984f71632 (diff) | |
download | bitcoin-ca6c154ef116e8d2e0484cdb1af13b34a0c86c17.tar.xz |
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/interface_rest.py')
-rwxr-xr-x | test/functional/interface_rest.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py index e73ec90819..0cd6a7b0c6 100755 --- a/test/functional/interface_rest.py +++ b/test/functional/interface_rest.py @@ -19,7 +19,6 @@ from test_framework.util import ( assert_equal, assert_greater_than, assert_greater_than_or_equal, - hex_str_to_bytes, ) from test_framework.messages import BLOCK_HEADER_SIZE @@ -147,7 +146,7 @@ class RESTTest (BitcoinTestFramework): bin_request = b'\x01\x02' for txid, n in [spending, spent]: - bin_request += hex_str_to_bytes(txid) + bin_request += bytes.fromhex(txid) bin_request += pack("i", n) bin_response = self.test_rest_request("/getutxos", http_method='POST', req_type=ReqType.BIN, body=bin_request, ret_type=RetType.BYTES) |