Skip to content

Commit cd1d384

Browse files
committed
lnwatcher: remove address callback if keep_watching is False
(follow-up 9b72dc2)
1 parent 40729aa commit cd1d384

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

electrum/lnwatcher.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ async def check_onchain_situation(self, address: str, funding_outpoint: str) ->
109109
closing_tx = self.adb.get_transaction(closing_txid)
110110
if closing_tx:
111111
keep_watching = await self.sweep_commitment_transaction(funding_outpoint, closing_tx)
112+
if not keep_watching:
113+
self.remove_callback(address)
112114
else:
113115
self.logger.info(f"channel {funding_outpoint} closed by {closing_txid}. still waiting for tx itself...")
114116
keep_watching = True

0 commit comments

Comments
 (0)