HomePhabricator

test: refactor: remove unneeded bytes<->hex conversions in `byte_to_base58`

Description

test: refactor: remove unneeded bytes<->hex conversions in byte_to_base58

Summary:
It seems like the only reason for using hex strings in this method was to have a convenient way to convert to an integer from the input data interpreted as big-endian.
In Python3 we have int.from_bytes(..., 'big') for that purpose, hence there is no need for that anymore and we can simply operate on bytes only.

This is a backport of core#24324

Depends on D11136

Test Plan: ninja check-functional-extended

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D11138

Details

Provenance
Sebastian Falbesoner <sebastian.falbesoner@gmail.com>Authored on Feb 12 2022, 01:34
PiRKCommitted on Mar 7 2022, 12:39
PiRKPushed on Mar 7 2022, 12:39
Reviewer
Restricted Project
Differential Revision
D11138: test: refactor: remove unneeded bytes<->hex conversions in `byte_to_base58`
Parents
rABC6d4745579c10: test: replace remaining binascii method calls in functional tests
Branches
Unknown
Tags
Unknown