@@ -36,6 +36,8 @@ static struct bitcoin_tx *close_tx(const tal_t *ctx,
3636 const struct chainparams * chainparams ,
3737 struct per_peer_state * pps ,
3838 const struct channel_id * channel_id ,
39+ u32 local_wallet_index ,
40+ const struct ext_key * local_wallet_ext_key ,
3941 u8 * scriptpubkey [NUM_SIDES ],
4042 const struct bitcoin_txid * funding_txid ,
4143 unsigned int funding_txout ,
@@ -69,6 +71,7 @@ static struct bitcoin_tx *close_tx(const tal_t *ctx,
6971 /* FIXME: We need to allow this! */
7072 tx = create_close_tx (ctx ,
7173 chainparams ,
74+ local_wallet_index , local_wallet_ext_key ,
7275 scriptpubkey [LOCAL ], scriptpubkey [REMOTE ],
7376 funding_wscript ,
7477 funding_txid ,
@@ -133,6 +136,8 @@ static void send_offer(struct per_peer_state *pps,
133136 const struct channel_id * channel_id ,
134137 const struct pubkey funding_pubkey [NUM_SIDES ],
135138 const u8 * funding_wscript ,
139+ u32 local_wallet_index ,
140+ const struct ext_key * local_wallet_ext_key ,
136141 u8 * scriptpubkey [NUM_SIDES ],
137142 const struct bitcoin_txid * funding_txid ,
138143 unsigned int funding_txout ,
@@ -154,6 +159,8 @@ static void send_offer(struct per_peer_state *pps,
154159 * #3](03-transactions.md#closing-transaction).
155160 */
156161 tx = close_tx (tmpctx , chainparams , pps , channel_id ,
162+ local_wallet_index ,
163+ local_wallet_ext_key ,
157164 scriptpubkey ,
158165 funding_txid ,
159166 funding_txout ,
@@ -213,6 +220,8 @@ receive_offer(struct per_peer_state *pps,
213220 const struct channel_id * channel_id ,
214221 const struct pubkey funding_pubkey [NUM_SIDES ],
215222 const u8 * funding_wscript ,
223+ u32 local_wallet_index ,
224+ const struct ext_key * local_wallet_ext_key ,
216225 u8 * scriptpubkey [NUM_SIDES ],
217226 const struct bitcoin_txid * funding_txid ,
218227 unsigned int funding_txout ,
@@ -267,6 +276,8 @@ receive_offer(struct per_peer_state *pps,
267276 * - MUST fail the connection.
268277 */
269278 tx = close_tx (tmpctx , chainparams , pps , channel_id ,
279+ local_wallet_index ,
280+ local_wallet_ext_key ,
270281 scriptpubkey ,
271282 funding_txid ,
272283 funding_txout ,
@@ -298,6 +309,8 @@ receive_offer(struct per_peer_state *pps,
298309 * - MAY eliminate its own output.
299310 */
300311 trimmed = close_tx (tmpctx , chainparams , pps , channel_id ,
312+ local_wallet_index ,
313+ local_wallet_ext_key ,
301314 scriptpubkey ,
302315 funding_txid ,
303316 funding_txout ,
@@ -583,6 +596,8 @@ int main(int argc, char *argv[])
583596 u32 min_feerate , initial_feerate ;
584597 struct feerange feerange ;
585598 enum side opener ;
599+ u32 local_wallet_index ;
600+ struct ext_key local_wallet_ext_key ;
586601 u8 * scriptpubkey [NUM_SIDES ], * funding_wscript ;
587602 u64 fee_negotiation_step ;
588603 u8 fee_negotiation_step_unit ;
@@ -608,8 +623,10 @@ int main(int argc, char *argv[])
608623 & out [LOCAL ],
609624 & out [REMOTE ],
610625 & our_dust_limit ,
611- & min_feerate , & initial_feerate ,
626+ & min_fee_to_accept , & initial_feerate ,
612627 & commitment_fee ,
628+ & local_wallet_index ,
629+ & local_wallet_ext_key ,
613630 & scriptpubkey [LOCAL ],
614631 & scriptpubkey [REMOTE ],
615632 & fee_negotiation_step ,
@@ -674,6 +691,8 @@ int main(int argc, char *argv[])
674691 if (whose_turn == LOCAL ) {
675692 send_offer (pps , chainparams ,
676693 & channel_id , funding_pubkey , funding_wscript ,
694+ local_wallet_index ,
695+ & local_wallet_ext_key ,
677696 scriptpubkey , & funding_txid , funding_txout ,
678697 funding , out , opener ,
679698 our_dust_limit ,
@@ -694,6 +713,8 @@ int main(int argc, char *argv[])
694713 = receive_offer (pps , chainparams ,
695714 & channel_id , funding_pubkey ,
696715 funding_wscript ,
716+ local_wallet_index ,
717+ & local_wallet_ext_key ,
697718 scriptpubkey , & funding_txid ,
698719 funding_txout , funding ,
699720 out , opener ,
@@ -725,6 +746,8 @@ int main(int argc, char *argv[])
725746 fee_negotiation_step_unit );
726747 send_offer (pps , chainparams , & channel_id ,
727748 funding_pubkey , funding_wscript ,
749+ local_wallet_index ,
750+ & local_wallet_ext_key ,
728751 scriptpubkey , & funding_txid , funding_txout ,
729752 funding , out , opener ,
730753 our_dust_limit ,
@@ -740,6 +763,8 @@ int main(int argc, char *argv[])
740763 = receive_offer (pps , chainparams , & channel_id ,
741764 funding_pubkey ,
742765 funding_wscript ,
766+ local_wallet_index ,
767+ & local_wallet_ext_key ,
743768 scriptpubkey , & funding_txid ,
744769 funding_txout , funding ,
745770 out , opener ,
0 commit comments