follow-up previous commit
This commit is contained in:
parent
78474978a0
commit
7bea7515f1
@ -928,7 +928,8 @@ class Peer(PrintError):
|
|||||||
assert success, success
|
assert success, success
|
||||||
return chan._replace(remote_state=chan.remote_state._replace(ctn=0),local_state=chan.local_state._replace(ctn=0, current_commitment_signature=remote_sig))
|
return chan._replace(remote_state=chan.remote_state._replace(ctn=0),local_state=chan.local_state._replace(ctn=0, current_commitment_signature=remote_sig))
|
||||||
|
|
||||||
def reestablish_channel(self, chan):
|
async def reestablish_channel(self, chan):
|
||||||
|
await self.initialized
|
||||||
self.channel_state[chan.channel_id] = 'REESTABLISHING'
|
self.channel_state[chan.channel_id] = 'REESTABLISHING'
|
||||||
self.network.trigger_callback('channel', chan)
|
self.network.trigger_callback('channel', chan)
|
||||||
self.send_message(gen_msg("channel_reestablish",
|
self.send_message(gen_msg("channel_reestablish",
|
||||||
|
|||||||
@ -157,9 +157,10 @@ class LNWorker(PrintError):
|
|||||||
outpoints = [Outpoint(x["tx_hash"], x["tx_pos"]) for x in utxos]
|
outpoints = [Outpoint(x["tx_hash"], x["tx_pos"]) for x in utxos]
|
||||||
if chan.funding_outpoint not in outpoints:
|
if chan.funding_outpoint not in outpoints:
|
||||||
self.channel_state[chan.channel_id] = "CLOSED"
|
self.channel_state[chan.channel_id] = "CLOSED"
|
||||||
elif chan.channel_id not in self.channel_state:
|
elif self.channel_state[chan.channel_id] == 'DISCONNECTED':
|
||||||
peer = self.peers[chan.node_id]
|
peer = self.peers[chan.node_id]
|
||||||
peer.reestablish_channel(c)
|
coro = peer.reestablish_channel(chan)
|
||||||
|
asyncio.run_coroutine_threadsafe(coro, self.network.asyncio_loop)
|
||||||
|
|
||||||
def on_network_update(self, event, *args):
|
def on_network_update(self, event, *args):
|
||||||
for chan in self.channels.values():
|
for chan in self.channels.values():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user