diff options
author | John Newbery <john@johnnewbery.com> | 2020-06-11 13:45:31 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2020-09-03 16:47:49 +0100 |
commit | 011e784f74411bd5d5dbccfd3af39e0937fd8933 (patch) | |
tree | af8ff1af13d22e8f619d260bea9d6d0aae2e29e6 /test/functional/test_framework/address.py | |
parent | e4557133f595f357df5e16ae4f2f19c579631396 (diff) |
[tests] Rename segwit encode and decode functions
These functions can be exported to other modules,
so be explicit that they're encoding and decoding
segwit addresses
Diffstat (limited to 'test/functional/test_framework/address.py')
-rw-r--r-- | test/functional/test_framework/address.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/test_framework/address.py b/test/functional/test_framework/address.py index 9506b63f82..536647534a 100644 --- a/test/functional/test_framework/address.py +++ b/test/functional/test_framework/address.py @@ -8,9 +8,9 @@ import enum import unittest from .script import hash256, hash160, sha256, CScript, OP_0 +from .segwit_addr import encode_segwit_address from .util import hex_str_to_bytes -from . import segwit_addr from test_framework.util import assert_equal @@ -100,7 +100,7 @@ def program_to_witness(version, program, main = False): assert 0 <= version <= 16 assert 2 <= len(program) <= 40 assert version > 0 or len(program) in [20, 32] - return segwit_addr.encode("bc" if main else "bcrt", version, program) + return encode_segwit_address("bc" if main else "bcrt", version, program) def script_to_p2wsh(script, main = False): script = check_script(script) |