@@ -90,6 +90,19 @@ enum proxy_impl {
9090static int g_proxy_impl ;
9191static enum hsm_wire_type g_proxy_last ;
9292
93+ /* FIXME - REMOVE THIS WHEN NO LONGER NEEDED */
94+ #if 0
95+ static void print_hex (char const * tag , void const * vptr , size_t sz )
96+ {
97+ fprintf (stderr , "%s: " , tag );
98+ uint8_t const * ptr = (uint8_t const * ) vptr ;
99+ for (size_t ii = 0 ; ii < sz ; ++ ii ) {
100+ fprintf (stderr , "%02x" , (int ) ptr [ii ]);
101+ }
102+ fprintf (stderr , "\n" );
103+ }
104+ #endif
105+
93106/*~ We keep track of clients, but there's not much to keep. */
94107struct client {
95108 /* The ccan/io async io connection for this client: it closes, we die. */
@@ -1076,12 +1089,10 @@ static struct io_plan *handle_sign_remote_commitment_tx(struct io_conn *conn,
10761089 struct client * c ,
10771090 const u8 * msg_in )
10781091{
1079- struct pubkey remote_funding_pubkey , local_funding_pubkey ;
1092+ struct pubkey remote_funding_pubkey ;
10801093 struct amount_sat funding ;
1081- struct secret channel_seed ;
10821094 struct bitcoin_tx * tx ;
10831095 struct bitcoin_signature sig ;
1084- struct secrets secrets ;
10851096 struct witscript * * output_witscripts ;
10861097 struct pubkey remote_per_commit ;
10871098 bool option_static_remotekey ;
@@ -1104,24 +1115,9 @@ static struct io_plan *handle_sign_remote_commitment_tx(struct io_conn *conn,
11041115 if (tal_count (output_witscripts ) != tx -> wtx -> num_outputs )
11051116 return bad_req_fmt (conn , c , msg_in , "tx must have matching witscripts" );
11061117
1107- /* FIXME - WE DON'T NEED THESE ANYMORE, RIGHT? */
1108- get_channel_seed (& c -> id , c -> dbid , & channel_seed );
1109- derive_basepoints (& channel_seed ,
1110- & local_funding_pubkey , NULL , & secrets , NULL );
1111-
11121118 /* Need input amount for signing */
11131119 tx -> input_amounts [0 ] = tal_dup (tx , struct amount_sat , & funding );
11141120
1115- /*
1116- funding_wscript = bitcoin_redeem_2of2(tmpctx,
1117- &local_funding_pubkey,
1118- &remote_funding_pubkey);
1119- sign_tx_input(tx, 0, NULL, funding_wscript,
1120- &secrets.funding_privkey,
1121- &local_funding_pubkey,
1122- SIGHASH_ALL,
1123- &sig);
1124- */
11251121 proxy_stat rv = proxy_handle_sign_remote_commitment_tx (
11261122 tx , & remote_funding_pubkey , & funding ,
11271123 & c -> id , c -> dbid ,
@@ -1628,7 +1624,7 @@ static struct io_plan *handle_check_future_secret(struct io_conn *conn,
16281624 return bad_req_fmt (conn , c , msg_in ,
16291625 "proxy_%s error: %s" , __FUNCTION__ ,
16301626 proxy_last_message ());
1631- g_proxy_impl = PROXY_IMPL_COMPLETE ;
1627+ g_proxy_impl = PROXY_IMPL_MARSHALED ;
16321628
16331629 /* FIXME - REPLACE BELOW W/ REMOTE RETURN */
16341630
@@ -2095,8 +2091,6 @@ static struct io_plan *handle_sign_node_announcement(struct io_conn *conn,
20952091 */
20962092 /* 2 bytes msg type + 64 bytes signature */
20972093 size_t offset = 66 ;
2098- struct sha256_double hash ;
2099- struct privkey node_pkey ;
21002094 secp256k1_ecdsa_signature sig ;
21012095 u8 * reply ;
21022096 u8 * ann ;
@@ -2121,14 +2115,7 @@ static struct io_plan *handle_sign_node_announcement(struct io_conn *conn,
21212115 return bad_req_fmt (conn , c , msg_in ,
21222116 "proxy_%s error: %s" , __FUNCTION__ ,
21232117 proxy_last_message ());
2124- g_proxy_impl = PROXY_IMPL_MARSHALED ;
2125-
2126- /* FIXME - REPLACE BELOW W/ REMOTE RETURN */
2127-
2128- node_key (& node_pkey , NULL );
2129- sha256_double (& hash , ann + offset , tal_count (ann ) - offset );
2130-
2131- sign_hash (& node_pkey , & hash , & sig );
2118+ g_proxy_impl = PROXY_IMPL_COMPLETE ;
21322119
21332120 reply = towire_hsm_node_announcement_sig_reply (NULL , & sig );
21342121 return req_reply (conn , c , take (reply ));
0 commit comments