@@ -1036,11 +1036,10 @@ static struct io_plan *handle_sign_commitment_tx(struct io_conn *conn,
10361036 * you'll crash if you assume it's there and you're wrong.) */
10371037 tx -> input_amounts [0 ] = tal_dup (tx , struct amount_sat , & funding );
10381038
1039- u8 * * * sigs ;
10401039 proxy_stat rv = proxy_handle_sign_commitment_tx (
10411040 tx , & remote_funding_pubkey , & funding ,
10421041 & c -> id , c -> dbid ,
1043- & sigs );
1042+ & sig );
10441043 if (PROXY_PERMANENT (rv ))
10451044 status_failed (STATUS_FAIL_INTERNAL_ERROR ,
10461045 "proxy_%s failed: %s" , __FUNCTION__ ,
@@ -1052,10 +1051,6 @@ static struct io_plan *handle_sign_commitment_tx(struct io_conn *conn,
10521051 g_proxy_impl = PROXY_IMPL_MARSHALED ;
10531052
10541053#if 0
1055- assert (tal_count (sigs ) == 1 );
1056-
1057- bool ok = signature_from_der (sigs [0 ][0 ], tal_count (sigs [0 ][0 ]), & sig );
1058- assert (ok );
10591054 status_debug ("%s:%d %s: signature: %s" ,
10601055 __FILE__ , __LINE__ , __FUNCTION__ ,
10611056 type_to_string (tmpctx , struct bitcoin_signature , & sig ));
@@ -1139,14 +1134,13 @@ static struct io_plan *handle_sign_remote_commitment_tx(struct io_conn *conn,
11391134 SIGHASH_ALL,
11401135 &sig);
11411136*/
1142- u8 * * * sigs ;
11431137 proxy_stat rv = proxy_handle_sign_remote_commitment_tx (
11441138 tx , & remote_funding_pubkey , & funding ,
11451139 & c -> id , c -> dbid ,
11461140 (const struct witscript * * ) output_witscripts ,
11471141 & remote_per_commit ,
11481142 option_static_remotekey ,
1149- & sigs );
1143+ & sig );
11501144 if (PROXY_PERMANENT (rv ))
11511145 status_failed (STATUS_FAIL_INTERNAL_ERROR ,
11521146 "proxy_%s failed: %s" , __FUNCTION__ ,
@@ -1155,11 +1149,8 @@ static struct io_plan *handle_sign_remote_commitment_tx(struct io_conn *conn,
11551149 return bad_req_fmt (conn , c , msg_in ,
11561150 "proxy_%s error: %s" , __FUNCTION__ ,
11571151 proxy_last_message ());
1158- assert (tal_count (sigs ) == 1 );
11591152 g_proxy_impl = PROXY_IMPL_COMPLETE ;
11601153
1161- bool ok = signature_from_der (sigs [0 ][0 ], tal_count (sigs [0 ][0 ]), & sig );
1162- assert (ok );
11631154 status_debug ("%s:%d %s: signature: %s" ,
11641155 __FILE__ , __LINE__ , __FUNCTION__ ,
11651156 type_to_string (tmpctx , struct bitcoin_signature , & sig ));
@@ -1694,11 +1685,10 @@ static struct io_plan *handle_sign_mutual_close_tx(struct io_conn *conn,
16941685 /* Need input amount for signing */
16951686 tx -> input_amounts [0 ] = tal_dup (tx , struct amount_sat , & funding );
16961687
1697- u8 * * * sigs ;
16981688 proxy_stat rv = proxy_handle_sign_mutual_close_tx (
16991689 tx , & remote_funding_pubkey , & funding ,
17001690 & c -> id , c -> dbid ,
1701- & sigs );
1691+ & sig );
17021692 if (PROXY_PERMANENT (rv ))
17031693 status_failed (STATUS_FAIL_INTERNAL_ERROR ,
17041694 "proxy_%s failed: %s" , __FUNCTION__ ,
@@ -2046,8 +2036,7 @@ static struct io_plan *handle_sign_invoice(struct io_conn *conn,
20462036 if (!fromwire_hsm_sign_invoice (tmpctx , msg_in , & u5bytes , & hrpu8 ))
20472037 return bad_req (conn , c , msg_in );
20482038
2049- u8 * sigbytes ;
2050- proxy_stat rv = proxy_handle_sign_invoice (u5bytes , hrpu8 , & sigbytes );
2039+ proxy_stat rv = proxy_handle_sign_invoice (u5bytes , hrpu8 , & rsig );
20512040 if (PROXY_PERMANENT (rv ))
20522041 status_failed (STATUS_FAIL_INTERNAL_ERROR ,
20532042 "proxy_%s failed: %s" , __FUNCTION__ ,
@@ -2058,9 +2047,7 @@ static struct io_plan *handle_sign_invoice(struct io_conn *conn,
20582047 proxy_last_message ());
20592048 g_proxy_impl = PROXY_IMPL_MARSHALED ;
20602049
2061- /* FIXME - convert the returned signature to an
2062- * secp256k1_ecdsa_recoverable_signature and remove the code
2063- * below. */
2050+ /* FIXME - USE THE PROXIED VALUE WHEN SERVER SUPPORTS */
20642051
20652052 /* BOLT #11:
20662053 *
0 commit comments