diff options
author | Pieter Wuille <pieter@wuille.net> | 2021-03-18 14:28:46 -0700 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2021-03-18 14:28:46 -0700 |
commit | 5c0210e3e639727dc3606f06b7c8aa3bb0008314 (patch) | |
tree | 45f477a7ac4b5a0d7f0c40a9b4b0cd502ae26522 /contrib/testgen | |
parent | 8ec881d3b6947d1e58917324606043ccb9d6198a (diff) |
bugfix: fix bech32_encode calls in gen_key_io_test_vectors.py
Diffstat (limited to 'contrib/testgen')
-rwxr-xr-x | contrib/testgen/gen_key_io_test_vectors.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/testgen/gen_key_io_test_vectors.py b/contrib/testgen/gen_key_io_test_vectors.py index 2f3189eca9..74918cfb04 100755 --- a/contrib/testgen/gen_key_io_test_vectors.py +++ b/contrib/testgen/gen_key_io_test_vectors.py @@ -149,7 +149,7 @@ def gen_valid_bech32_vector(template): witprog = bytearray(os.urandom(template[2])) encoding = template[4] dst_prefix = bytearray(template[5]) - rv = bech32_encode(hrp, [witver] + convertbits(witprog, 8, 5), encoding) + rv = bech32_encode(encoding, hrp, [witver] + convertbits(witprog, 8, 5)) return rv, dst_prefix + witprog def gen_valid_vectors(): @@ -210,7 +210,7 @@ def gen_invalid_bech32_vector(template): encoding = template[3] if no_data: - rv = bech32_encode(hrp, [], encoding) + rv = bech32_encode(encoding, hrp, []) else: data = [witver] + convertbits(witprog, 8, 5) if template[4] and not no_data: @@ -218,7 +218,7 @@ def gen_invalid_bech32_vector(template): data[-1] |= 1 else: data.append(0) - rv = bech32_encode(hrp, data, encoding) + rv = bech32_encode(encoding, hrp, data) if template[5]: i = len(rv) - random.randrange(1, 7) |