@@ -2833,14 +2833,15 @@ static struct commitsig *interactive_send_commitments(struct peer *peer,
28332833
28342834static struct wally_psbt_output * find_channel_output (struct peer * peer ,
28352835 struct wally_psbt * psbt ,
2836- u32 * chan_output_index )
2836+ u32 * chan_output_index ,
2837+ const struct pubkey * remote_funding_pubkey )
28372838{
28382839 const u8 * wit_script ;
28392840 u8 * scriptpubkey ;
28402841
28412842 wit_script = bitcoin_redeem_2of2 (tmpctx ,
28422843 & peer -> channel -> funding_pubkey [LOCAL ],
2843- & peer -> splicing -> remote_funding_pubkey );
2844+ remote_funding_pubkey );
28442845
28452846 scriptpubkey = scriptpubkey_p2wsh (tmpctx , wit_script );
28462847
@@ -3334,7 +3335,8 @@ static void resume_splice_negotiation(struct peer *peer,
33343335 & peer -> channel -> funding_pubkey [LOCAL ],
33353336 & peer -> channel -> funding_pubkey [REMOTE ]);
33363337
3337- find_channel_output (peer , current_psbt , & chan_output_index );
3338+ find_channel_output (peer , current_psbt , & chan_output_index ,
3339+ & peer -> channel -> funding_pubkey [REMOTE ]);
33383340
33393341 splice_funding_index = find_channel_funding_input (current_psbt ,
33403342 & peer -> channel -> funding );
@@ -3758,7 +3760,8 @@ static void splice_accepter(struct peer *peer, const u8 *inmsg)
37583760 & peer -> channel -> funding );
37593761
37603762 new_chan_output = find_channel_output (peer , ictx -> current_psbt ,
3761- & outpoint .n );
3763+ & outpoint .n ,
3764+ & peer -> splicing -> remote_funding_pubkey );
37623765
37633766 both_amount = check_balances (peer , our_role , ictx -> current_psbt ,
37643767 outpoint .n , splice_funding_index );
@@ -3983,7 +3986,8 @@ static void splice_initiator_user_finalized(struct peer *peer)
39833986 psbt_sort_by_serial_id (ictx -> current_psbt );
39843987
39853988 new_chan_output = find_channel_output (peer , ictx -> current_psbt ,
3986- & chan_output_index );
3989+ & chan_output_index ,
3990+ & peer -> splicing -> remote_funding_pubkey );
39873991
39883992 splice_funding_index = find_channel_funding_input (ictx -> current_psbt ,
39893993 & peer -> channel -> funding );
0 commit comments