@@ -273,15 +273,16 @@ static enum tx_role our_tx_role(const struct peer *peer)
273
273
}
274
274
275
275
static const u8 * psbt_to_tx_sigs_msg (const tal_t * ctx ,
276
- struct channel * channel ,
276
+ const struct peer * peer ,
277
277
const struct wally_psbt * psbt )
278
278
{
279
- const struct witness_stack * * ws =
280
- psbt_to_witness_stacks (tmpctx , psbt ,
281
- channel -> opener );
279
+ const struct witness_stack * * ws ;
280
+
281
+ ws = psbt_to_witness_stacks (tmpctx , psbt ,
282
+ our_tx_role (peer ));
282
283
283
- return towire_tx_signatures (ctx , & channel -> cid ,
284
- & channel -> funding_txid ,
284
+ return towire_tx_signatures (ctx , & peer -> channel -> cid ,
285
+ & peer -> channel -> funding_txid ,
285
286
ws );
286
287
}
287
288
#endif /* EXPERIMENTAL_FEATURES */
@@ -2051,8 +2052,7 @@ static void handle_send_tx_sigs(struct peer *peer, const u8 *msg)
2051
2052
tal_wally_end (tal_steal (peer , peer -> psbt ));
2052
2053
#if EXPERIMENTAL_FEATURES
2053
2054
sync_crypto_write (peer -> pps ,
2054
- take (psbt_to_tx_sigs_msg (NULL , peer -> channel ,
2055
- psbt )));
2055
+ take (psbt_to_tx_sigs_msg (NULL , peer , psbt )));
2056
2056
#endif /* EXPERIMENTAL_FEATURES */
2057
2057
}
2058
2058
@@ -2803,8 +2803,7 @@ static void peer_reconnect(struct peer *peer,
2803
2803
our_tx_role (peer ))
2804
2804
&& !peer -> funding_locked [REMOTE ])
2805
2805
sync_crypto_write (peer -> pps ,
2806
- take (psbt_to_tx_sigs_msg (NULL , peer -> channel ,
2807
- peer -> psbt )));
2806
+ take (psbt_to_tx_sigs_msg (NULL , peer , peer -> psbt )));
2808
2807
#endif /* EXPERIMENTAL_FEATURES */
2809
2808
2810
2809
/* BOLT #2:
@@ -3605,8 +3604,7 @@ static void init_channel(struct peer *peer)
3605
3604
if (!reconnected && peer -> psbt &&
3606
3605
psbt_side_finalized (peer -> psbt , our_tx_role (peer )))
3607
3606
sync_crypto_write (peer -> pps ,
3608
- take (psbt_to_tx_sigs_msg (NULL , peer -> channel ,
3609
- peer -> psbt )));
3607
+ take (psbt_to_tx_sigs_msg (NULL , peer , peer -> psbt )));
3610
3608
#endif /* EXPERIMENTAL_FEATURES */
3611
3609
3612
3610
/* Reenable channel */
0 commit comments