Merge #163: commands.py: use fingerprint if already captured by client
0cf6bb9commands.py: use fingerprint if already captured by client (Peter D. Gray) Pull request description: For me with a `signmessage` to the Coldcard simulator, this saves 6-7 seconds. But this should speed up all devices, since they are already capturing the fingerprint value into the enumeration information. ACKs for commit 0cf6bb: achow101: ACK0cf6bb9998Tree-SHA512: db2bb8eed855b70e8f1ee68c4eaf59eae191732246525669f9e600c10bee0dca1108685f1f508c24232151a792b8178d11bf80eee8cf880f0442e5f69dd81f56
This commit is contained in:
commit
57a06836b9
@ -48,8 +48,12 @@ def find_device(device_path, password='', device_type=None, fingerprint=None):
|
||||
client = None
|
||||
try:
|
||||
client = get_client(d['type'], d['path'], password)
|
||||
master_xpub = client.get_pubkey_at_path('m/0h')['xpub']
|
||||
master_fpr = get_xpub_fingerprint_hex(master_xpub)
|
||||
|
||||
master_fpr = d.get('fingerprint', None)
|
||||
if master_fpr is None:
|
||||
master_xpub = client.get_pubkey_at_path('m/0h')['xpub']
|
||||
master_fpr = get_xpub_fingerprint_hex(master_xpub)
|
||||
|
||||
if fingerprint and master_fpr != fingerprint:
|
||||
client.close()
|
||||
continue
|
||||
|
||||
Loading…
Reference in New Issue
Block a user