Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_dump.py
Show All 24 Lines | with open(file_name, encoding='utf8') as inputfile: | ||||
# only read non comment lines | # only read non comment lines | ||||
if line[0] != "#" and len(line) > 10: | if line[0] != "#" and len(line) > 10: | ||||
# split out some data | # split out some data | ||||
key_date_label, comment = line.split("#") | key_date_label, comment = line.split("#") | ||||
key_date_label = key_date_label.split(" ") | key_date_label = key_date_label.split(" ") | ||||
# key = key_date_label[0] | # key = key_date_label[0] | ||||
date = key_date_label[1] | date = key_date_label[1] | ||||
keytype = key_date_label[2] | keytype = key_date_label[2] | ||||
if not len(comment) or date.startswith('1970'): | |||||
imported_key = date == '1970-01-01T00:00:01Z' | |||||
if imported_key: | |||||
# Imported keys have multiple addresses, no label (keypath) and timestamp | |||||
# Skip them | |||||
continue | continue | ||||
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 == "inactivehdseed=1": | if keytype == "inactivehdseed=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 | ||||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |