diff options
author | John Newbery <john@johnnewbery.com> | 2020-06-11 13:50:27 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2020-09-03 16:47:49 +0100 |
commit | 7f639df0b8a15aaeccedab00b634925f568c2c9a (patch) | |
tree | bc50cb66832e2173aa6c4eed0fe0ceeca386a730 /test/functional/test_framework | |
parent | 011e784f74411bd5d5dbccfd3af39e0937fd8933 (diff) | |
download | bitcoin-7f639df0b8a15aaeccedab00b634925f568c2c9a.tar.xz |
[tests] Remove unused optional verify_checksum parameter
This optional parameter is never used, so remove it.
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r-- | test/functional/test_framework/address.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/test_framework/address.py b/test/functional/test_framework/address.py index 536647534a..a4ce8a164f 100644 --- a/test/functional/test_framework/address.py +++ b/test/functional/test_framework/address.py @@ -45,7 +45,10 @@ def byte_to_base58(b, version): return result -def base58_to_byte(s, verify_checksum=True): +def base58_to_byte(s): + """Converts a base58-encoded string to its data and version. + + Throws if the base58 checksum is invalid.""" if not s: return b'' n = 0 @@ -65,8 +68,9 @@ def base58_to_byte(s, verify_checksum=True): else: break res = b'\x00' * pad + res - if verify_checksum: - assert_equal(hash256(res[:-4])[:4], res[-4:]) + + # Assert if the checksum is invalid + assert_equal(hash256(res[:-4])[:4], res[-4:]) return res[1:-4], int(res[0]) |