channeld: send next_to_send if EXPERIMENTAL_FEATURES

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-06-04 14:43:47 +09:30
parent 45e6080764
commit 7e33e4430d

View File

@@ -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: