commit c478f3bb91371204c9015fb7160a9c26ca15607e
parent 39fc72dad63b217ae040f82ffc0da2c5cfce2c92
Author: ThomasV <thomasv@electrum.org>
Date: Sun, 27 Dec 2020 18:11:34 +0100
channel backups: fix exception in raised after channel is force closed
Traceback (most recent call last):
File "/opt/electrum/electrum/util.py", line 1056, in wrapper
return await func(*args, **kwargs)
File "/opt/electrum/electrum/lnwatcher.py", line 183, in on_network_update
await callback()
File "/opt/electrum/electrum/lnwatcher.py", line 200, in check_onchain_situation
keep_watching = await self.do_breach_remedy(funding_outpoint, closing_tx, spenders)
File "/opt/electrum/electrum/lnwatcher.py", line 377, in do_breach_remedy
sweep_info_dict = chan.sweep_ctx(closing_tx)
File "/opt/electrum/electrum/lnchannel.py", line 227, in sweep_ctx
our_sweep_info = self.create_sweeptxs_for_our_ctx(ctx)
File "/opt/electrum/electrum/lnchannel.py", line 216, in create_sweeptxs_for_our_ctx
return create_sweeptxs_for_our_ctx(chan=self, ctx=ctx, sweep_address=self.sweep_address)
File "/opt/electrum/electrum/lnchannel.py", line 321, in sweep_address
assert self.lnworker.wallet.is_mine(addr)
AssertionError
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py
@@ -491,7 +491,11 @@ class ChannelBackup(AbstractChannel):
return False
def is_static_remotekey_enabled(self) -> bool:
- return True
+ # Return False so that self.sweep_address will return self._fallback_sweep_address
+ # Since channel backups do not save the static_remotekey, payment_basepoint in
+ # their local config is not static)
+ return False
+
class Channel(AbstractChannel):