aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-06-11 13:50:27 -0400
committerJohn Newbery <john@johnnewbery.com>2020-09-03 16:47:49 +0100
commit7f639df0b8a15aaeccedab00b634925f568c2c9a (patch)
treebc50cb66832e2173aa6c4eed0fe0ceeca386a730
parent011e784f74411bd5d5dbccfd3af39e0937fd8933 (diff)
downloadbitcoin-7f639df0b8a15aaeccedab00b634925f568c2c9a.tar.xz
[tests] Remove unused optional verify_checksum parameter
This optional parameter is never used, so remove it.
-rw-r--r--test/functional/test_framework/address.py10
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])