Wordlist subclasses 'tuple' so it can be transparently used.
'in' and '.index()' are fast.
Use Wordlist in bip39_is_checksum_valid, which makes that faster.
closes#5954
We are now giving every(?) hint possible to the MacOS file dialog...
The extension is put in the filename as before (which turned out not to be enough).
It is also set using QFileDialog.setDefaultSuffix, which again, turns out not to be enough.
In desperation, the file extension filter-list now contains *.psbt and *.txn as separate filters,
and the one with the expected extension is pre-selected. This seems enough...
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\main_window.py", line 1503, in do_pay
self.do_pay_invoice(invoice)
File "...\electrum\electrum\gui\qt\main_window.py", line 1516, in do_pay_invoice
self.pay_onchain_dialog(self.get_coins(), outputs)
File "...\electrum\electrum\gui\qt\main_window.py", line 1570, in pay_onchain_dialog
self.preview_tx_dialog(make_tx=make_tx,
File "...\electrum\electrum\gui\qt\main_window.py", line 1574, in preview_tx_dialog
d = PreviewTxDialog(make_tx=make_tx, external_keypairs=external_keypairs,
File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 654, in __init__
self.update()
File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 392, in update
tx_details = self.wallet.get_tx_info(self.tx)
File "...\electrum\electrum\wallet.py", line 486, in get_tx_info
tx_we_already_have_in_db = self.db.get_transaction(tx_hash)
File "...\electrum\electrum\json_db.py", line 44, in wrapper
return func(self, *args, **kwargs)
File "...\electrum\electrum\wallet_db.py", line 822, in get_transaction
assert isinstance(tx_hash, str)
AssertionError
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\confirm_tx_dialog.py", line 65, in timer_actions
self.update()
File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 392, in update
tx_details = self.wallet.get_tx_info(self.tx)
File "...\electrum\electrum\wallet.py", line 486, in get_tx_info
tx_we_already_have_in_db = self.db.get_transaction(tx_hash)
File "...\electrum\electrum\json_db.py", line 44, in wrapper
return func(self, *args, **kwargs)
File "...\electrum\electrum\wallet_db.py", line 822, in get_transaction
if tx_hash is None:
AssertionError
Power-users that know what they are doing can use this method
to populate key origin information for keystore (bip32 root fingerprint
and derivation path prefix).
Try to make method hard to misuse.
Qt console can now be used as e.g.:
```
wallet.get_keystores()[2].add_key_origin(derivation_prefix="m/48h/1h/0h/2h", root_fingerprint="deadbeef")
```
related #5715
related #5955
related #5969
Messages sent as part of the payment were getting interleaved with the channel_reestablish.
It does not actually make sense to do a payment and then reestablish the channel in the same transport -- the channel is supposed to already have been reestablished to do a payment in the first place.
So, after payment, strip down the transport, and set up a new transport before reestablishing.
Traceback (most recent call last):
File "...\Python\Python38\lib\unittest\case.py", line 60, in testPartExecutor
yield
File "...\Python\Python38\lib\unittest\case.py", line 676, in run
self._callTestMethod(testMethod)
File "...\Python\Python38\lib\unittest\case.py", line 633, in _callTestMethod
method()
File "...\electrum\electrum\tests\test_lnpeer.py", line 262, in test_reestablish_with_old_state
run(f())
File "...\electrum\electrum\tests\test_lnpeer.py", line 302, in run
return asyncio.run_coroutine_threadsafe(coro, loop=asyncio.get_event_loop()).result()
File "...\Python\Python38\lib\concurrent\futures\_base.py", line 439, in result
return self.__get_result()
File "...\Python\Python38\lib\concurrent\futures\_base.py", line 388, in __get_result
raise self._exception
File "...\electrum\electrum\tests\test_lnpeer.py", line 260, in f
await gath
File "...\electrum\electrum\lnpeer.py", line 439, in _message_loop
self.process_message(msg)
File "...\electrum\electrum\lnpeer.py", line 159, in process_message
execution_result = f(payload)
File "...\electrum\electrum\lnpeer.py", line 1308, in on_revoke_and_ack
chan.receive_revocation(rev)
File "...\electrum\electrum\lnchannel.py", line 556, in receive_revocation
raise Exception('revoked secret not for current point')
Exception: revoked secret not for current point