@@ -1217,12 +1217,7 @@ static struct io_plan *handle_sign_delayed_payment_to_us(struct io_conn *conn,
12171217{
12181218 u64 commit_num ;
12191219 struct amount_sat input_sat ;
1220- struct secret channel_seed , basepoint_secret ;
1221- struct pubkey basepoint ;
12221220 struct bitcoin_tx * tx ;
1223- struct sha256 shaseed ;
1224- struct pubkey per_commitment_point ;
1225- struct privkey privkey ;
12261221 u8 * wscript ;
12271222
12281223 /*~ We don't derive the wscript ourselves, but perhaps we should? */
@@ -1250,39 +1245,7 @@ static struct io_plan *handle_sign_delayed_payment_to_us(struct io_conn *conn,
12501245 proxy_last_message ());
12511246 g_proxy_impl = PROXY_IMPL_MARSHALED ;
12521247
1253- /* FIXME - REPLACE BELOW W/ REMOTE RETURN */
1254-
1255- get_channel_seed (& c -> id , c -> dbid , & channel_seed );
1256-
1257- /*~ ccan/crypto/shachain how we efficiently derive 2^48 ordered
1258- * preimages from a single seed; the twist is that as the preimages
1259- * are revealed, you can generate the previous ones yourself, needing
1260- * to only keep log(N) of them at any time. */
1261- if (!derive_shaseed (& channel_seed , & shaseed ))
1262- return bad_req_fmt (conn , c , msg_in , "bad derive_shaseed" );
1263-
1264- /*~ BOLT #3 describes exactly how this is used to generate the Nth
1265- * per-commitment point. */
1266- if (!per_commit_point (& shaseed , & per_commitment_point , commit_num ))
1267- return bad_req_fmt (conn , c , msg_in ,
1268- "bad per_commitment_point %" PRIu64 ,
1269- commit_num );
1270-
1271- /*~ ... which is combined with the basepoint to generate then N'th key.
1272- */
1273- if (!derive_delayed_payment_basepoint (& channel_seed ,
1274- & basepoint ,
1275- & basepoint_secret ))
1276- return bad_req_fmt (conn , c , msg_in , "failed deriving basepoint" );
1277-
1278- if (!derive_simple_privkey (& basepoint_secret ,
1279- & basepoint ,
1280- & per_commitment_point ,
1281- & privkey ))
1282- return bad_req_fmt (conn , c , msg_in , "failed deriving privkey" );
1283-
1284- return handle_sign_to_us_tx (conn , c , msg_in ,
1285- tx , & privkey , wscript , input_sat );
1248+ return req_reply (conn , c , take (towire_hsm_sign_tx_reply (NULL , & sig )));
12861249}
12871250
12881251/*~ This is used when a commitment transaction is onchain, and has an HTLC
0 commit comments