File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2013,6 +2013,22 @@ static struct commitsig_info *handle_peer_commit_sig(struct peer *peer,
20132013 if (commit_index ) {
20142014 outpoint = peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint ;
20152015 funding_sats = peer -> splice_state -> inflights [commit_index - 1 ]-> amnt ;
2016+
2017+ if (!cs_tlv || !cs_tlv -> splice_info )
2018+ peer_failed_err (peer -> pps , & peer -> channel_id ,
2019+ "Must set funding_txid for each"
2020+ " extra commitment_signed message." );
2021+
2022+ status_info ("handle_peer_commit_sig for inflight outpoint %s" , fmt_bitcoin_txid (tmpctx , & peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint .txid ));
2023+ status_info ("handle_peer_commit_sig cs_tlv->splice_info->funding_txid %s" , fmt_bitcoin_txid (tmpctx , & cs_tlv -> splice_info -> funding_txid ));
2024+
2025+ if (!bitcoin_txid_eq (& peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint .txid ,
2026+ & cs_tlv -> splice_info -> funding_txid ))
2027+ peer_failed_err (peer -> pps , & peer -> channel_id ,
2028+ "Expected commit sig message for %s but"
2029+ " got %s" ,
2030+ fmt_bitcoin_txid (tmpctx , & peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint .txid ),
2031+ fmt_bitcoin_txid (tmpctx , & cs_tlv -> splice_info -> funding_txid ));
20162032 }
20172033 else {
20182034 outpoint = peer -> channel -> funding ;
You can’t perform that action at this time.
0 commit comments