mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-18 11:37:40 +02:00
Merge #16465: test: Test p2sh-witness and bech32 in wallet_import_rescan
fa3c6575calint: Add false positive to python dead code linter (MarcoFalke)fa25668e1ctest: Test p2sh-witness and bech32 in wallet_import_rescan (MarcoFalke)fa79af2989test: Replace fragile "rng" with call to random() (MarcoFalke)fac3dcf7d0test: Generate one block for each send in wallet_import_rescan (MarcoFalke) Pull request description: This adds test coverage for segwit in the `wallet_import_rescan` test, among other cleanups. ACKs for top commit: jnewbery: ACKfa3c6575caTree-SHA512: 877741763c62c1bf9d868864a1e3f0699857e8c028e9fcd65c7eeb73600c22cbe97b7b51093737743d9e87bcb991c1fe1086f673e18765aef0fcfe27951402f0
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user