e.g. consider:
>>> 1.5 * 2 ** 2000
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: int too large to convert to float
some basic sanity checks
Previously if the server sent back a malformed response, it could partially corrupt a wallet file.
(as sometimes the response would get persisted, and issues would only arise later when the values were used)
Before this, we were subscribing to our addresses in their bip32 order,
leaking this information to servers. While this leak seems mostly harmless,
it is trivial to fix.
...\electrum\electrum\util.py:1096: DeprecationWarning: SocksConnector is deprecated. Use ProxyConnector instead.
connector = SocksConnector(
...\Python38\site-packages\aiohttp_socks\proxy\socks5_proxy.py:37: DeprecationWarning: Parameter family is deprecated and will be ignored.
super().__init__(
- add 'computing route' status for lightning payments
- use separate callbacks for invoice status and payment popups
- show payment error and payment logs in kivy
Internally, we've been using an expiration of 0 to mean "never expires".
For LN invoices, BOLT-11 does not specify what an expiration of 0 means.
Other clients seem to treat it as "0 seconds" (i.e. already expired).
This means there is no way to create a BOLT-11 invoice that "never" expires.
For LN invoices,
- we now treat an expiration of 0, , as "0 seconds",
- when creating an invoice, if the user selected never, we will put 100 years as expiration
notably this is needed when the shell itself does not get a chance to expand "~",
e.g. when a path is passed via JSON-RPC
>>> os.path.normcase(os.path.realpath(os.path.abspath("~/.electrum/testnet/wallets/delete_me2")))
'/home/user/wspace/electrum/~/.electrum/testnet/wallets/delete_me2'
>>> os.path.normcase(os.path.realpath(os.path.abspath(os.path.expanduser("~/.electrum/testnet/wallets/delete_me2"))))
'/home/user/.electrum/testnet/wallets/delete_me2'
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\main_window.py", line 994, in <lambda>
self.create_invoice_button.clicked.connect(lambda: self.create_invoice(False))
File "...\electrum\electrum\gui\qt\main_window.py", line 1123, in create_invoice
key = self.create_bitcoin_request(amount, message, expiry)
File "...\electrum\electrum\gui\qt\main_window.py", line 1132, in create_bitcoin_request
addr = self.wallet.get_unused_address()
File "...\electrum\electrum\wallet.py", line 1452, in wrapper
addr = func(self, *args, **kwargs)
File "...\electrum\electrum\wallet.py", line 1465, in get_unused_address
addrs = self.get_unused_addresses()
File "...\electrum\electrum\wallet.py", line 1459, in get_unused_addresses
in_use_by_request = [k for k in self.receive_requests.keys() if self.get_request_status(k)[0] != PR_EXPIRED]
File "...\electrum\electrum\wallet.py", line 1459, in <listcomp>
in_use_by_request = [k for k in self.receive_requests.keys() if self.get_request_status(k)[0] != PR_EXPIRED]
File "...\electrum\electrum\wallet.py", line 1535, in get_request_status
if exp > 0 and time.time() > timestamp + exp:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
scenario: enter extremely high feerate (which we cannot satisfy) then click into fee_edit.
At that moment, fee_edit is empty and both feerate_edit and fee_edit are considered frozen.
As fee_edit has priority, we would construct a tx with default fee.
Now, instead, we won't construct this default fee tx ~as if the click to fee_edit did not happen.