Issue: #2209
Fixes this error when signing with a HW wallet:
./electrum
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python3: xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)
The cause is likely with the `show_message()` calls. The proper fix
would be to hunt down where QT Gui elements are touched from a wrong
thread.
The workaround is to call XInitThreads(), as the error message suggests.
- a keypair is derived from the wallet password
- only the public key is retained in memory
- wallets must opened and closed explicitly with the daemon
- separation between Wallet and key management (Keystore)
- simplification of wallet classes
- remove support for multiple accounts in the same wallet
- add support for OP_RETURN to Trezor plugin
- split multi-accounts wallets for backward compatibility
Break out the workflow logic of the install wizard
into a base class. This means reimplementing with
full support in a new GUI is now easy; you just provide
ways to request passwords, show messages etc. The API
is fully documented in the base class.
There are a couple of minor outstanding issues, including that
the old messages shown when recovering a wallet are missing.
I will come back to that. Ledger wallet might be broken.
Other improvements:
The install wizard code is now easy to follow and understand.
Hardware wallets can now be restored without any need for their
accompanying libraries.
Various bits of trustedcoin were broken and have been fixed.
Many plugin hooks can be removed. I have only started on this.