@@ -1197,11 +1197,12 @@ static u8 *send_commit_part(const tal_t *ctx,
11971197 (int )splice_amnt , (int )remote_splice_amnt ,
11981198 remote_index );
11991199
1200- cs_tlv -> splice_info = tal ( cs_tlv ,
1201- struct tlv_commitment_signed_tlvs_splice_info );
1200+ if ( batch_size > 1 ) {
1201+ cs_tlv -> splice_info = tal ( cs_tlv , struct tlv_commitment_signed_tlvs_splice_info );
12021202
1203- cs_tlv -> splice_info -> batch_size = batch_size ;
1204- cs_tlv -> splice_info -> funding_txid = funding -> txid ;
1203+ cs_tlv -> splice_info -> batch_size = batch_size ;
1204+ cs_tlv -> splice_info -> funding_txid = funding -> txid ;
1205+ }
12051206 }
12061207
12071208 txs = channel_txs (tmpctx , funding , funding_sats , & htlc_map ,
@@ -2016,20 +2017,21 @@ static struct commitsig_info *handle_peer_commit_sig(struct peer *peer,
20162017 outpoint = peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint ;
20172018 funding_sats = peer -> splice_state -> inflights [commit_index - 1 ]-> amnt ;
20182019
2019- if (!cs_tlv || !cs_tlv -> splice_info )
2020+ if (cs_tlv && cs_tlv -> splice_info
2021+ && cs_tlv -> splice_info -> batch_size == 1 )
20202022 peer_failed_err (peer -> pps , & peer -> channel_id ,
2021- "Must set funding_txid for each"
2022- " extra commitment_signed message." );
2023+ "batch_size can never be 1" );
20232024
2024- status_info ("handle_peer_commit_sig for inflight outpoint %s" , fmt_bitcoin_txid ( tmpctx , & peer -> splice_state -> inflights [ commit_index - 1 ] -> outpoint . txid ));
2025- status_info ( "handle_peer_commit_sig cs_tlv->splice_info->funding_txid %s" , fmt_bitcoin_txid (tmpctx , & cs_tlv -> splice_info -> funding_txid ));
2025+ status_debug ("handle_peer_commit_sig for inflight outpoint %s" ,
2026+ fmt_bitcoin_txid (tmpctx , & outpoint . txid ));
20262027
2027- if (!bitcoin_txid_eq (& peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint .txid ,
2028- & cs_tlv -> splice_info -> funding_txid ))
2028+ if (cs_tlv -> splice_info
2029+ && !bitcoin_txid_eq (& outpoint .txid ,
2030+ & cs_tlv -> splice_info -> funding_txid ))
20292031 peer_failed_err (peer -> pps , & peer -> channel_id ,
20302032 "Expected commit sig message for %s but"
20312033 " got %s" ,
2032- fmt_bitcoin_txid (tmpctx , & peer -> splice_state -> inflights [ commit_index - 1 ] -> outpoint .txid ),
2034+ fmt_bitcoin_txid (tmpctx , & outpoint .txid ),
20332035 fmt_bitcoin_txid (tmpctx , & cs_tlv -> splice_info -> funding_txid ));
20342036 }
20352037 else {
@@ -2354,6 +2356,13 @@ static struct commitsig_info *handle_peer_commit_sig_batch(struct peer *peer,
23542356 " [%" PRIu16 "/%" PRIu16 "]" ,
23552357 tal_hex (sub_msg , sub_msg ), i , batch_size );
23562358
2359+ if (!sub_cs_tlv -> splice_info )
2360+ peer_failed_warn (peer -> pps , & peer -> channel_id ,
2361+ "commit_sig %s in commit_sig batch:"
2362+ " [%" PRIu16 "/%" PRIu16 "] missing"
2363+ " splice_info" ,
2364+ tal_hex (sub_msg , sub_msg ), i , batch_size );
2365+
23572366 if (!sub_cs_tlv -> splice_info
23582367 || sub_cs_tlv -> splice_info -> batch_size != batch_size )
23592368 peer_failed_err (peer -> pps , & peer -> channel_id ,
0 commit comments