From 7e33e4430d640272147378b5717cbbcf32ba7862 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 4 Jun 2021 14:43:47 +0930 Subject: [PATCH] channeld: send next_to_send if EXPERIMENTAL_FEATURES Signed-off-by: Rusty Russell --- channeld/channeld.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/channeld/channeld.c b/channeld/channeld.c index 620b191b3..025395067 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -2500,6 +2500,12 @@ static void peer_reconnect(struct peer *peer, #if EXPERIMENTAL_FEATURES send_tlvs = tlv_channel_reestablish_tlvs_new(tmpctx); + /* BOLT-upgrade_protocol #2: + * A node sending `channel_reestablish`, if it supports upgrading channels: + * - MUST set `next_to_send` the commitment number of the next + * `commitment_signed` it expects to send. + */ + send_tlvs->next_to_send = tal_dup(send_tlvs, u64, &peer->next_index[REMOTE]); #endif /* BOLT #2: