diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-08-05 12:14:38 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-08-05 12:15:01 +0200 |
commit | f4328ebef52f51a5ee45cc42815c91ccd28b0669 (patch) | |
tree | c419289605be3219360b66a6ef43081fc1ce25ec /share | |
parent | c4b42aa4ffa1596742135acaa805343675acd7ab (diff) | |
parent | 5a1bef60a03b57de708a1a751bd90b8245fd8b83 (diff) |
Merge bitcoin/bitcoin#22619: test: refactor: use consistent bytes <-> hex-string conversion in functional test framework
5a1bef60a03b57de708a1a751bd90b8245fd8b83 test: refactor: remove binascii from test_framework (Zero-1729)
Pull request description:
This PR continues the work started in PR #22593, regarding using the `bytes` built-in module. In this PR specifically, instances of `binascii`'s methods `hexlify`, `unhexlify`, and `a2b_hex` have been replaced with the build-in `bytes` module's `hex` and `fromhex` methods where appropriate to make bytes <-> hex-string conversions consistent across the functional test files and test_framework.
Additionally, certain changes made are based on the following assumption:
```
bytes.hex(data) == binascii.hexlify(data).decode()
bytes.hex(data).encode() == binascii.hexlify(data)
```
Ran the functional tests to ensure behaviour is still consistent and changes didn't break existing tests.
closes #22605
ACKs for top commit:
theStack:
Code-review ACK 5a1bef60a03b57de708a1a751bd90b8245fd8b83 🔢
Tree-SHA512: 8f28076cf0580a0d02a156f3e1e94c9badd3d41c3fbdfb2b87cd8a761dde2c94faa5f4c448d6747b1ccc9111c3ef1a1d7b42a11c806b241fa0410b7529e2445f
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions