Skip to content

Commit a1ff175

Browse files
committed
Updated to SignHolderCommitmentTxPhase2
1 parent d9ab160 commit a1ff175

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

contrib/remote_hsmd/proxy.cc

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,25 +1131,17 @@ proxy_stat proxy_handle_sign_commitment_tx(
11311131
);
11321132

11331133
last_message = "";
1134-
SignHolderCommitmentTxRequest req;
1134+
SignHolderCommitmentTxPhase2Request req;
11351135
marshal_node_id(&self_id, req.mutable_node_id());
11361136
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-
}
11451137
req.set_commit_num(commit_num);
1146-
req.set_feerate_sat_per_kw(feerate);
11471138

11481139
ClientContext context;
1149-
SignatureReply rsp;
1150-
Status status = stub->SignHolderCommitmentTx(&context, req, &rsp);
1140+
CommitmentTxSignatureReply rsp;
1141+
Status status = stub->SignHolderCommitmentTxPhase2(&context, req, &rsp);
11511142
if (status.ok()) {
11521143
unmarshal_bitcoin_signature(rsp.signature(), o_sig);
1144+
// NOTE - ignoring rsp.htlc_signatures
11531145
STATUS_DEBUG("%s:%d %s { \"self_id\":%s, \"sig\":%s }",
11541146
__FILE__, __LINE__, __FUNCTION__,
11551147
dump_node_id(&self_id).c_str(),

0 commit comments

Comments
 (0)