@@ -1197,11 +1197,12 @@ static u8 *send_commit_part(const tal_t *ctx,
1197
1197
(int )splice_amnt , (int )remote_splice_amnt ,
1198
1198
remote_index );
1199
1199
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 );
1202
1202
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
+ }
1205
1206
}
1206
1207
1207
1208
txs = channel_txs (tmpctx , funding , funding_sats , & htlc_map ,
@@ -2016,20 +2017,21 @@ static struct commitsig_info *handle_peer_commit_sig(struct peer *peer,
2016
2017
outpoint = peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint ;
2017
2018
funding_sats = peer -> splice_state -> inflights [commit_index - 1 ]-> amnt ;
2018
2019
2019
- if (!cs_tlv || !cs_tlv -> splice_info )
2020
+ if (cs_tlv && cs_tlv -> splice_info
2021
+ && cs_tlv -> splice_info -> batch_size == 1 )
2020
2022
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" );
2023
2024
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 ));
2026
2027
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 ))
2029
2031
peer_failed_err (peer -> pps , & peer -> channel_id ,
2030
2032
"Expected commit sig message for %s but"
2031
2033
" got %s" ,
2032
- fmt_bitcoin_txid (tmpctx , & peer -> splice_state -> inflights [ commit_index - 1 ] -> outpoint .txid ),
2034
+ fmt_bitcoin_txid (tmpctx , & outpoint .txid ),
2033
2035
fmt_bitcoin_txid (tmpctx , & cs_tlv -> splice_info -> funding_txid ));
2034
2036
}
2035
2037
else {
@@ -2354,6 +2356,13 @@ static struct commitsig_info *handle_peer_commit_sig_batch(struct peer *peer,
2354
2356
" [%" PRIu16 "/%" PRIu16 "]" ,
2355
2357
tal_hex (sub_msg , sub_msg ), i , batch_size );
2356
2358
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
+
2357
2366
if (!sub_cs_tlv -> splice_info
2358
2367
|| sub_cs_tlv -> splice_info -> batch_size != batch_size )
2359
2368
peer_failed_err (peer -> pps , & peer -> channel_id ,
0 commit comments