small enhancement

This commit is contained in:
Alexey Karyabkin 2018-06-19 16:02:41 +04:00
parent a92e3316b2
commit 7db3129a0c
2 changed files with 3 additions and 3 deletions

View File

@ -85,6 +85,6 @@ MAINNET_PUBLIC_WALLET_VERSION = b'\x04\x88\xB2\x1E'
TESTNET_PRIVATE_WALLET_VERSION = b'\x04\x35\x83\x94'
TESTNET_PUBLIC_WALLET_VERSION = b'\x04\x35\x87\xCF'
FIRST_HARDENED_CHILD = 0x80000000
PATH_LEVEL_BIP0044 = [0x8000002C, 0x80000000, 0x80000000]
TESTNET_PATH_LEVEL_BIP0044 = [0x8000002C, 0x80000001, 0x80000000]
PATH_LEVEL_BIP0044 = [0x8000002C, 0x80000000, 0x80000000, 0, 0]
TESTNET_PATH_LEVEL_BIP0044 = [0x8000002C, 0x80000001, 0x80000000, 0, 0]

View File

@ -262,7 +262,7 @@ def validate_private_key(key):
def validate_path_level(path_level, testnet):
if not len(path_level):
return True
elif len(path_level) == 3:
elif len(path_level) == 5:
if path_level[0] != 0x8000002C:
return False
elif testnet and path_level[1] != 0x80000001: