follow-up 46d8080c76: own channels are no longer in channel_db

This commit is contained in:
ThomasV
2020-03-11 10:26:07 +01:00
parent 81dc2591b1
commit af457ea2ec

View File

@@ -770,10 +770,6 @@ class LNWallet(LNWorker):
async def update_closed_channel(self, chan, funding_txid, funding_height, closing_txid, closing_height, keep_watching):
# remove from channel_db
if chan.short_channel_id is not None:
self.channel_db.remove_channel(chan.short_channel_id)
if chan.get_state() < channel_states.CLOSED:
chan.set_state(channel_states.CLOSED)
@@ -957,10 +953,6 @@ class LNWallet(LNWorker):
async def _pay_to_route(self, route: LNPaymentRoute, lnaddr: LnAddr) -> PaymentAttemptLog:
short_channel_id = route[0].short_channel_id
chan = self.get_channel_by_short_id(short_channel_id)
if not chan:
self.channel_db.remove_channel(short_channel_id)
raise Exception(f"PathFinder returned path with short_channel_id "
f"{short_channel_id} that is not in channel list")
peer = self.peers.get(route[0].node_id)
if not peer:
raise Exception('Dropped peer')