protobuf 4.x introduced breaking changes compared to 3.20.
To adapt, we would have to regenerate paymentrequest_pb2.py, using protoc>=3.19.0, however ubuntu does not have new enough protoc.
Also, unsure if newly generated paymentrequest_pb2.py would be supported by older versions of protobuf.
Best to just wait for things to settle.
```
electrum/__init__.py:20: in <module>
from .wallet import Wallet
electrum/wallet.py:70: in <module>
from . import transaction, bitcoin, coinchooser, paymentrequest, ecc, bip32
electrum/paymentrequest.py:37: in <module>
from . import paymentrequest_pb2 as pb2
electrum/paymentrequest_pb2.py:36: in <module>
_descriptor.FieldDescriptor(
.tox/py3/lib/python3.9/site-packages/google/protobuf/descriptor.py:560: in __new__
_message.Message._CheckCalledFromGeneratedFile()
E TypeError: Descriptors cannot not be created directly.
E If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
E If you cannot immediately regenerate your protos, some other possible workarounds are:
E 1. Downgrade the protobuf package to 3.20.x or lower.
E 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E
E More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
```
ceaae1b6a3/CHANGES.txt (L47)
```
E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
File "...\electrum\electrum\gui\qt\channels_list.py", line 377, in new_channel_with_warning
self.new_channel_dialog()
File "...\electrum\electrum\gui\qt\channels_list.py", line 399, in new_channel_dialog
return d.run()
File "...\electrum\electrum\gui\qt\new_channel_dialog.py", line 133, in run
if self.min_amount_sat and funding_sat < self.min_amount_sat:
TypeError: '<' not supported between instances of 'str' and 'int'
```
When replaying messages during channel-reestablishment,
previously we first resent all update messages, along with potential commitment_signed messages,
and then we potentially resent a single revoke_and_ack.
This can result in incorrect behaviour in case both a commitment_signed and a revoke_and_ack needs to be resent.
When replaying messages, the relative order of commitment_signed and revoke_and_messages needs to be preserved.
(the order of updates (htlc/fee) in relation to the revack messages does not matter)
implements https://github.com/lightning/bolts/pull/810
The logic here is somewhat based on what c-lightning does:
01e5f1886e/channeld/channeld.c (L3059)
- use SetMinimumSize instead of sizeHint
(partially reverts 28f794b63b)
- to deal with small window sizes, set MinimumHeight of the
parent TabWidget (with a few extra pixels for margins)
- add an extra layout around address_help_text, so that it has
margins (margins were removed in 28f794b63b)
Previously the receive_tabs widget was allowed to be much smaller
than its inner main widget (e.g. truncating visible QR code).
A bit hackish to overwrite/monkeypatch sizeHint,
but I've tried a few approaches and this seems to work best.
Disable rebalance/swap suggestions attached to requests/invoices if there is an ongoing task.
Note: This assumes that all tasks are lightning payments, which is true for the moment.
These methods return a list of channels that can be rebalanced,
in order to receive or send a given amount.
Also add 'channels' parameter to submarine swaps.
Previously, swaps were not considering which channel to use.
When we do not have liquidity to pay an invoice:
- add 'rebalance' option in order to pay an invoice
- use the suggested channel in the 'swap' option
When we do not have the liquidity to receive an invoice:
- add 'Rebalance' and 'Swap' buttons to the receive tab