@@ -833,14 +833,9 @@ static struct io_plan *handle_cannouncement_sig(struct io_conn *conn,
833833 */
834834 /* First type bytes are the msg type */
835835 size_t offset = 2 + 256 ;
836- struct privkey node_pkey ;
837836 secp256k1_ecdsa_signature node_sig , bitcoin_sig ;
838- struct sha256_double hash ;
839837 u8 * reply ;
840838 u8 * ca ;
841- struct pubkey funding_pubkey ;
842- struct privkey funding_privkey ;
843- struct secret channel_seed ;
844839
845840 /*~ You'll find FIXMEs like this scattered through the code.
846841 * Sometimes they suggest simple improvements which someone like
@@ -850,10 +845,6 @@ static struct io_plan *handle_cannouncement_sig(struct io_conn *conn,
850845 /*~ Christian uses TODO(cdecker) or FIXME(cdecker), but I'm sure he won't
851846 * mind if you fix this for him! */
852847
853- /* FIXME: We should cache these. */
854- get_channel_seed (& c -> id , c -> dbid , & channel_seed );
855- derive_funding_key (& channel_seed , & funding_pubkey , & funding_privkey );
856-
857848 /*~ fromwire_ routines which need to do allocation take a tal context
858849 * as their first field; tmpctx is good here since we won't need it
859850 * after this function. */
@@ -881,15 +872,7 @@ static struct io_plan *handle_cannouncement_sig(struct io_conn *conn,
881872 return bad_req_fmt (conn , c , msg_in ,
882873 "proxy_%s error: %s" , __FUNCTION__ ,
883874 proxy_last_message ());
884- g_proxy_impl = PROXY_IMPL_MARSHALED ;
885-
886- /* FIXME - REPLACE BELOW W/ REMOTE RETURN */
887-
888- node_key (& node_pkey , NULL );
889- sha256_double (& hash , ca + offset , tal_count (ca ) - offset );
890-
891- sign_hash (& node_pkey , & hash , & node_sig );
892- sign_hash (& funding_privkey , & hash , & bitcoin_sig );
875+ g_proxy_impl = PROXY_IMPL_COMPLETE ;
893876
894877 reply = towire_hsm_cannouncement_sig_reply (NULL , & node_sig ,
895878 & bitcoin_sig );
0 commit comments