When initialising a Trezor as part of the wallet creation,
device_info.label is still the old (None) label in on_hw_derivation.
This is because device_info was created during the initial scan.
related: #6063
E | gui.qt.installwizard.InstallWizard |
Traceback (most recent call last):
File "...\electrum\electrum\base_wizard.py", line 541, in create_wallet
password = k.get_password_for_storage_encryption()
File "...\electrum\electrum\keystore.py", line 768, in get_password_for_storage_encryption
client = self.plugin.get_client(self)
File "...\electrum\electrum\plugins\trezor\trezor.py", line 180, in get_client
client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
File "...\electrum\electrum\plugin.py", line 465, in client_for_keystore
info = self.select_device(plugin, handler, keystore, devices)
File "...\electrum\electrum\plugin.py", line 585, in select_device
raise UserCancelled()
electrum.util.UserCancelled
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\installwizard.py", line 300, in select_storage
self.run('choose_hw_device', HWD_SETUP_DECRYPT_WALLET, storage=temp_storage)
File "...\electrum\electrum\base_wizard.py", line 109, in run
f(*args, **kwargs)
File "...\electrum\electrum\base_wizard.py", line 332, in choose_hw_device
self.choice_dialog(title=title, message=msg, choices=choices,
File "...\electrum\electrum\gui\qt\installwizard.py", line 99, in func_wrapper
out = func(*args, **kwargs)
File "...\electrum\electrum\gui\qt\installwizard.py", line 536, in choice_dialog
self.exec_layout(vbox, title)
File "...\electrum\electrum\gui\qt\installwizard.py", line 392, in exec_layout
raise UserCancelled
electrum.util.UserCancelled
previously, client.handler was sometimes
- an InstallWizard
- a QtHandlerBase where win was an ElectrumWindow
- a QtHandlerBase where win was an InstallWizard
- a CmdLineHandler
That's just too much dynamic untyped undocumented polymorphism...
Now it will never be an InstallWizard (replaced with QtHandlerBase where win is an InstallWizard),
and now in all cases client.handler is an instance of HardwareHandlerBase, yay.
related: #6063
The previous description made it sound like it returned the list of
currently connected servers; this clarifies that it's only a list of
candidate servers to connect to (no guarantee that they are all currently
connected).
I believe this now implements all the checks listed in BOLT-02 for
update_add_htlc, however, the BOLT is sometimes ambiguous,
and actually the checks listed there IMO are insufficient.
There are still some TODOs, in part because of the above.
(which is the logical thing to do, as it too will be rebuilt as part of
the history, and the parts of it that might not be present after the
rebuild is exactly what a call to "clear_history" is supposed to get rid of)
we were looking at inconsistent ctns
and we were looking at the wrong subject's ctx
all the FIXMEs and TODOs here will still warrant some attention.
(note that test_DesyncHTLCs was passing incorrectly:
the "assertRaises" was catching a different exception)