Browse Source
lnworker: also check expiring_htlcs in ChannelState.SHUTDOWN
otherwise the remote could intentionally send "shutdown" during an attack
patch-4
SomberNight
3 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
2 additions and
1 deletions
-
electrum/lnworker.py
|
|
@ -971,7 +971,8 @@ class LNWallet(LNWorker): |
|
|
|
util.trigger_callback('channel', self.wallet, chan) |
|
|
|
return |
|
|
|
|
|
|
|
if chan.get_state() == ChannelState.OPEN and chan.should_be_closed_due_to_expiring_htlcs(self.network.get_local_height()): |
|
|
|
if (chan.get_state() in (ChannelState.OPEN, ChannelState.SHUTDOWN) |
|
|
|
and chan.should_be_closed_due_to_expiring_htlcs(self.network.get_local_height())): |
|
|
|
self.logger.info(f"force-closing due to expiring htlcs") |
|
|
|
await self.schedule_force_closing(chan.channel_id) |
|
|
|
|
|
|
|