fixes broken test_trampoline_mpp_consolidation caused to fail by
https://github.com/spesmilo/electrum/pull/9845 by allowing single
channel splits for trampoline payments if TEST_FORCE_MPP is Trues
as the test relies on mpp through a single channel (it tests mpp and
there is only a single channel on the graph).
introduces a class SwapOffer which is used instead of passing around
offers in dicts.
Also fixes incorrect variable naming of swapserver npubs / public keys
by assigning the npub instead of the hex pubkey to
config.SWAPSERVER_NPUB
If a force-close happens due to e.g. a feerate disagreement or an invalid signature, etc,
and the remote peer sends us an error, it can be useful if users can provide us with this error.
If the user does not have logging enabled when the error is sent, without this persistence it will likely get lost.
adds some delay before detecting the scrollbar in the terms of use
dialog. This prevents it from falsely detecting a scrollbar and
disabling the "I Agree" button even if there is no scrollbar. I noticed this
issue on windows, the order in which the window is created seems to be
slightliy different from linux/wayland there.
- was added when functions in lnsweep returned already signed tx, and signing is expensive
- get_ctx_sweep_info does not presign anymore
- cache invalidation is difficult here
- e.g. not only on new blocks, but we should e.g. also invalidate the cache when learning new preimages
tx_height comes from the `get_history` RPC, we then call the `get_transaction` RPC.
By the time the `get_transaction` RPC returns, we might have received another
scripthash status update, called `get_history` again, and updated height for the txid.
Synchronizer._get_transaction() should not call adb.receive_tx_callback() with
the old tx_height (but it was doing exactly that).
Patch to trigger, e.g. regtest failures:
(e.g. for tests.regtest.TestLightningAB.test_extract_preimage)
```
diff --git a/electrum/interface.py b/electrum/interface.py
index 8649652b9c..fce7a1c6de 100644
--- a/electrum/interface.py
+++ b/electrum/interface.py
@@ -991,6 +991,7 @@ class Interface(Logger):
return res
async def get_transaction(self, tx_hash: str, *, timeout=None) -> str:
+ await asyncio.sleep(3)
if not is_hash256_str(tx_hash):
raise Exception(f"{repr(tx_hash)} is not a txid")
raw = await self.session.send_request('blockchain.transaction.get', [tx_hash], timeout=timeout)
```