@@ -1105,51 +1105,34 @@ proxy_stat proxy_handle_sign_mutual_close_tx(
11051105}
11061106
11071107proxy_stat proxy_handle_sign_commitment_tx (
1108- struct bitcoin_tx *tx,
1109- const struct pubkey *counterparty_funding_pubkey,
11101108 struct node_id *peer_id,
11111109 u64 dbid,
1112- struct simple_htlc **htlcs,
1113- u64 commit_num, u32 feerate,
1110+ u64 commit_num,
11141111 struct bitcoin_signature *o_sig)
11151112{
11161113 STATUS_DEBUG (
11171114 " %s:%d %s { "
11181115 " \" self_id\" :%s, \" peer_id\" :%s, \" dbid\" :%" PRIu64 " , "
1119- " \" counterparty_funding_pubkey\" :%s, \" tx\" :%s, "
1120- " \" htlcs\" :%s, "
1121- " \" commit_num\" :%" PRIu64 " , "
1122- " \" feerate\" :%d }" ,
1116+ " \" commit_num\" :%" PRIu64 " }" ,
11231117 __FILE__, __LINE__, __FUNCTION__,
11241118 dump_node_id (&self_id).c_str (),
11251119 dump_node_id (peer_id).c_str (),
11261120 dbid,
1127- dump_pubkey (counterparty_funding_pubkey).c_str (),
1128- dump_tx (tx).c_str (),
1129- dump_htlcs ((const struct simple_htlc **) htlcs, tal_count (htlcs)).c_str (),
1130- commit_num, feerate
1121+ commit_num
11311122 );
11321123
11331124 last_message = " " ;
1134- SignHolderCommitmentTxRequest req;
1125+ SignHolderCommitmentTxPhase2Request req;
11351126 marshal_node_id (&self_id, req.mutable_node_id ());
11361127 marshal_channel_nonce (peer_id, dbid, req.mutable_channel_nonce ());
1137- marshal_single_input_tx (tx, NULL , req.mutable_tx ());
1138- for (size_t ii = 0 ; ii < tal_count (htlcs); ++ii) {
1139- if (htlcs[ii]->side == LOCAL) {
1140- marshal_htlc (htlcs[ii], req.add_offered_htlcs ());
1141- } else {
1142- marshal_htlc (htlcs[ii], req.add_received_htlcs ());
1143- }
1144- }
11451128 req.set_commit_num (commit_num);
1146- req.set_feerate_sat_per_kw (feerate);
11471129
11481130 ClientContext context;
1149- SignatureReply rsp;
1150- Status status = stub->SignHolderCommitmentTx (&context, req, &rsp);
1131+ CommitmentTxSignatureReply rsp;
1132+ Status status = stub->SignHolderCommitmentTxPhase2 (&context, req, &rsp);
11511133 if (status.ok ()) {
11521134 unmarshal_bitcoin_signature (rsp.signature (), o_sig);
1135+ // NOTE - ignoring rsp.htlc_signatures
11531136 STATUS_DEBUG (" %s:%d %s { \" self_id\" :%s, \" sig\" :%s }" ,
11541137 __FILE__, __LINE__, __FUNCTION__,
11551138 dump_node_id (&self_id).c_str (),
0 commit comments