mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-18 20:44:27 +01:00
channel: Re-enable channel after reconnect
Simply done by sending an enabling update after reconnect. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
9b42f49d2c
commit
aeeb0b7011
@@ -1513,7 +1513,7 @@ static void peer_reconnect(struct peer *peer)
|
||||
bool retransmit_revoke_and_ack;
|
||||
struct htlc_map_iter it;
|
||||
const struct htlc *htlc;
|
||||
u8 *msg;
|
||||
u8 *msg, *cupdate;
|
||||
|
||||
/* BOLT #2:
|
||||
*
|
||||
@@ -1676,6 +1676,12 @@ again:
|
||||
if (htlc->state == SENT_REMOVE_HTLC)
|
||||
send_fail_or_fulfill(peer, htlc);
|
||||
}
|
||||
|
||||
/* Reenable channel by sending a channel_update without the
|
||||
* disable flag */
|
||||
cupdate = create_channel_update(peer, peer, false);
|
||||
daemon_conn_send(&peer->gossip_client, cupdate);
|
||||
msg_enqueue(&peer->peer_out, take(cupdate));
|
||||
}
|
||||
|
||||
static void handle_funding_locked(struct peer *peer, const u8 *msg)
|
||||
|
||||
Reference in New Issue
Block a user