1
0

detect redeemed channels (fix #5963)

This commit is contained in:
ThomasV
2020-02-16 18:54:27 +01:00
parent f8da0f87a7
commit 938fab86d1
5 changed files with 35 additions and 23 deletions

View File

@@ -1192,9 +1192,8 @@ class LNWallet(LNWorker):
return tx.txid()
def remove_channel(self, chan_id):
# TODO: assert that closing tx is deep-mined and htlcs are swept
chan = self.channels[chan_id]
assert chan.is_closed()
assert chan.get_state() == channel_states.REDEEMED
with self.lock:
self.channels.pop(chan_id)
self.channel_timestamps.pop(chan_id.hex())