aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/address.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-07-25 17:11:31 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-08-14 17:20:07 -0400
commitfa25668e1c8982548f1c6f94780709c625811469 (patch)
tree80ab8e926170356b8d32ddfca56e12413f437bc4 /test/functional/test_framework/address.py
parentfa79af298917d501cee26370fdf9d44d05133d15 (diff)
downloadbitcoin-fa25668e1c8982548f1c6f94780709c625811469.tar.xz
test: Test p2sh-witness and bech32 in wallet_import_rescan
Diffstat (limited to 'test/functional/test_framework/address.py')
-rw-r--r--test/functional/test_framework/address.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/test_framework/address.py b/test/functional/test_framework/address.py
index f36cffe957..194f2f061b 100644
--- a/test/functional/test_framework/address.py
+++ b/test/functional/test_framework/address.py
@@ -4,6 +4,8 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Encode and decode BASE58, P2PKH and P2SH addresses."""
+import enum
+
from .script import hash256, hash160, sha256, CScript, OP_0
from .util import hex_str_to_bytes
@@ -11,6 +13,13 @@ from . import segwit_addr
ADDRESS_BCRT1_UNSPENDABLE = 'bcrt1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3xueyj'
+
+class AddressType(enum.Enum):
+ bech32 = 'bech32'
+ p2sh_segwit = 'p2sh-segwit'
+ legacy = 'legacy' # P2PKH
+
+
chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'