1
0

Fix #5975: Forget or redeem channels that are never funded.

- initiator: wait until double spent
 - non-initiator: wait until timeout
This commit is contained in:
ThomasV
2020-02-24 12:01:54 +01:00
parent ed29a45d50
commit 5785c2fa2f
5 changed files with 36 additions and 5 deletions

View File

@@ -322,6 +322,9 @@ class WatchTower(LNWatcher):
pass
CHANNEL_OPENING_TIMEOUT = 24*60*60
class LNWalletWatcher(LNWatcher):
def __init__(self, lnworker, network):
@@ -337,7 +340,7 @@ class LNWalletWatcher(LNWatcher):
return
if funding_height.height == TX_HEIGHT_LOCAL:
chan.delete_funding_height()
return
await self.lnworker.update_unfunded_channel(chan, funding_txid)
elif closing_height.height == TX_HEIGHT_LOCAL:
chan.save_funding_height(funding_txid, funding_height.height, funding_height.timestamp)
await self.lnworker.update_open_channel(chan, funding_txid, funding_height)