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 @@ -2015,6 +2015,22 @@ static struct commitsig_info *handle_peer_commit_sig(struct peer *peer,
20152015 if (commit_index ) {
20162016 outpoint = peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint ;
20172017 funding_sats = peer -> splice_state -> inflights [commit_index - 1 ]-> amnt ;
2018+
2019+ if (!cs_tlv || !cs_tlv -> splice_info )
2020+ peer_failed_err (peer -> pps , & peer -> channel_id ,
2021+ "Must set funding_txid for each"
2022+ " extra commitment_signed message." );
2023+
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 ));
2026+
2027+ if (!bitcoin_txid_eq (& peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint .txid ,
2028+ & cs_tlv -> splice_info -> funding_txid ))
2029+ peer_failed_err (peer -> pps , & peer -> channel_id ,
2030+ "Expected commit sig message for %s but"
2031+ " got %s" ,
2032+ fmt_bitcoin_txid (tmpctx , & peer -> splice_state -> inflights [commit_index - 1 ]-> outpoint .txid ),
2033+ fmt_bitcoin_txid (tmpctx , & cs_tlv -> splice_info -> funding_txid ));
20182034 }
20192035 else {
20202036 outpoint = peer -> channel -> funding ;
You can’t perform that action at this time.
0 commit comments