1
0

lnworker: also check expiring_htlcs in ChannelState.SHUTDOWN

otherwise the remote could intentionally send "shutdown" during an attack
This commit is contained in:
SomberNight
2022-06-07 22:37:25 +02:00
parent f7573dbce6
commit 8674fd96d5

View File

@@ -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)