@@ -1179,34 +1179,6 @@ static struct io_plan *handle_sign_remote_htlc_tx(struct io_conn *conn,
11791179 return req_reply (conn , c , take (towire_hsm_sign_tx_reply (NULL , & sig )));
11801180}
11811181
1182- // TODO - This goes away when we complete all callers.
1183- //
1184- /*~ This covers several cases where onchaind is creating a transaction which
1185- * sends funds to our internal wallet. */
1186- /* FIXME: Derive output address for this client, and check it here! */
1187- static struct io_plan * handle_sign_to_us_tx (struct io_conn * conn ,
1188- struct client * c ,
1189- const u8 * msg_in ,
1190- struct bitcoin_tx * tx ,
1191- const struct privkey * privkey ,
1192- const u8 * wscript ,
1193- struct amount_sat input_sat )
1194- {
1195- struct bitcoin_signature sig ;
1196- struct pubkey pubkey ;
1197-
1198- if (!pubkey_from_privkey (privkey , & pubkey ))
1199- return bad_req_fmt (conn , c , msg_in , "bad pubkey_from_privkey" );
1200-
1201- if (tx -> wtx -> num_inputs != 1 )
1202- return bad_req_fmt (conn , c , msg_in , "bad txinput count" );
1203-
1204- tx -> input_amounts [0 ] = tal_dup (tx , struct amount_sat , & input_sat );
1205- sign_tx_input (tx , 0 , NULL , wscript , privkey , & pubkey , SIGHASH_ALL , & sig );
1206-
1207- return req_reply (conn , c , take (towire_hsm_sign_tx_reply (NULL , & sig )));
1208- }
1209-
12101182/*~ When we send a commitment transaction onchain (unilateral close), there's
12111183 * a delay before we can spend it. onchaind does an explicit transaction to
12121184 * transfer it to the wallet so that doesn't need to remember how to spend
@@ -1302,11 +1274,8 @@ static struct io_plan *handle_sign_penalty_to_us(struct io_conn *conn,
13021274 const u8 * msg_in )
13031275{
13041276 struct amount_sat input_sat ;
1305- struct secret channel_seed , revocation_secret , revocation_basepoint_secret ;
1306- struct pubkey revocation_basepoint ;
1277+ struct secret revocation_secret ;
13071278 struct bitcoin_tx * tx ;
1308- struct pubkey point ;
1309- struct privkey privkey ;
13101279 u8 * wscript ;
13111280
13121281 if (!fromwire_hsm_sign_penalty_to_us (tmpctx , msg_in ,
@@ -1332,30 +1301,9 @@ static struct io_plan *handle_sign_penalty_to_us(struct io_conn *conn,
13321301 return bad_req_fmt (conn , c , msg_in ,
13331302 "proxy_%s error: %s" , __FUNCTION__ ,
13341303 proxy_last_message ());
1335- g_proxy_impl = PROXY_IMPL_MARSHALED ;
1336-
1337- /* FIXME - REPLACE BELOW W/ REMOTE RETURN */
1338-
1339- if (!pubkey_from_secret (& revocation_secret , & point ))
1340- return bad_req_fmt (conn , c , msg_in , "Failed deriving pubkey" );
1341-
1342- get_channel_seed (& c -> id , c -> dbid , & channel_seed );
1343- if (!derive_revocation_basepoint (& channel_seed ,
1344- & revocation_basepoint ,
1345- & revocation_basepoint_secret ))
1346- return bad_req_fmt (conn , c , msg_in ,
1347- "Failed deriving revocation basepoint" );
1348-
1349- if (!derive_revocation_privkey (& revocation_basepoint_secret ,
1350- & revocation_secret ,
1351- & revocation_basepoint ,
1352- & point ,
1353- & privkey ))
1354- return bad_req_fmt (conn , c , msg_in ,
1355- "Failed deriving revocation privkey" );
1304+ g_proxy_impl = PROXY_IMPL_COMPLETE ;
13561305
1357- return handle_sign_to_us_tx (conn , c , msg_in ,
1358- tx , & privkey , wscript , input_sat );
1306+ return req_reply (conn , c , take (towire_hsm_sign_tx_reply (NULL , & sig )));
13591307}
13601308
13611309/*~ This is used when a commitment transaction is onchain, and has an HTLC
0 commit comments