Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_dump.py
Show All 29 Lines | with open(file_name, encoding='utf8') as inputfile: | ||||
keytype = key_label.split(" ")[2] | keytype = key_label.split(" ")[2] | ||||
if len(comment) > 1: | if len(comment) > 1: | ||||
addr_keypath = comment.split(" addr=")[1] | addr_keypath = comment.split(" addr=")[1] | ||||
addr = addr_keypath.split(" ")[0] | addr = addr_keypath.split(" ")[0] | ||||
keypath = None | keypath = None | ||||
if keytype == "inactivehdmaster=1": | if keytype == "inactivehdmaster=1": | ||||
# ensure the old master is still available | # ensure the old master is still available | ||||
assert(hd_master_addr_old == addr) | assert(hd_master_addr_old == addr) | ||||
elif keytype == "hdmaster=1": | elif keytype == "hdseed=1": | ||||
# ensure we have generated a new hd master key | # ensure we have generated a new hd master key | ||||
assert(hd_master_addr_old != addr) | assert(hd_master_addr_old != addr) | ||||
hd_master_addr_ret = addr | hd_master_addr_ret = addr | ||||
elif keytype == "script=1": | elif keytype == "script=1": | ||||
# scripts don't have keypaths | # scripts don't have keypaths | ||||
keypath = None | keypath = None | ||||
else: | else: | ||||
keypath = addr_keypath.rstrip().split("hdkeypath=")[1] | keypath = addr_keypath.rstrip().split("hdkeypath=")[1] | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |