diff --git a/channeld/channeld.c b/channeld/channeld.c index efe3475b7fd6..b6607170c852 100644 --- a/channeld/channeld.c +++ b/channeld/channeld.c @@ -688,7 +688,9 @@ static void check_mutual_channel_ready(struct peer *peer) if (peer->channel_ready[LOCAL] && peer->channel_ready[REMOTE]) { /* Make sure the hsmd agrees that this outpoint is * sufficiently buried. */ - msg = towire_hsmd_sync_outpoint(NULL, &peer->channel->funding); + msg = towire_hsmd_sync_outpoint(NULL, + &peer->channel->funding.txid, + peer->channel->funding.n); msg = hsm_req(tmpctx, take(msg)); if (!fromwire_hsmd_sync_outpoint_reply(msg)) status_failed(STATUS_FAIL_HSM_IO, @@ -770,7 +772,7 @@ static void check_mutual_splice_locked(struct peer *peer) /* Make sure the hsmd agrees that this outpoint is * sufficiently buried. */ const u8 *msg2; - msg2 = towire_hsmd_sync_outpoint(NULL, &inflight->outpoint); + msg2 = towire_hsmd_sync_outpoint(NULL, &inflight->outpoint.txid, inflight->outpoint.n); msg2 = hsm_req(tmpctx, take(msg2)); if (!fromwire_hsmd_sync_outpoint_reply(msg2)) status_failed(STATUS_FAIL_HSM_IO, diff --git a/hsmd/hsmd_wire.csv b/hsmd/hsmd_wire.csv index 98e9b8149b47..979c0c1c2da9 100644 --- a/hsmd/hsmd_wire.csv +++ b/hsmd/hsmd_wire.csv @@ -92,7 +92,8 @@ msgtype,hsmd_setup_channel_reply,131 # Sent when channel_ready or splice_locked are mutual. # Ensures that hsmd sees outpoint buried. msgtype,hsmd_sync_outpoint,32 -msgdata,hsmd_sync_outpoint,funding_outpoint,bitcoin_outpoint, +msgdata,hsmd_sync_outpoint,funding_txid,bitcoin_txid, +msgdata,hsmd_sync_outpoint,funding_txout,u16, # No value returned msgtype,hsmd_sync_outpoint_reply,132 diff --git a/hsmd/libhsmd.c b/hsmd/libhsmd.c index 5e345f5b3c63..53cd78182e25 100644 --- a/hsmd/libhsmd.c +++ b/hsmd/libhsmd.c @@ -389,9 +389,10 @@ static u8 *handle_setup_channel(struct hsmd_client *c, const u8 *msg_in) * to ensure they are caught up when outpoints are freshly buried */ static u8 *handle_sync_outpoint(struct hsmd_client *c, const u8 *msg_in) { - struct bitcoin_outpoint outpoint; + struct bitcoin_txid funding_txid; + u16 funding_txout; - if (!fromwire_hsmd_sync_outpoint(msg_in, &outpoint)) + if (!fromwire_hsmd_sync_outpoint(msg_in, &funding_txid, &funding_txout)) return hsmd_status_malformed_request(c, msg_in); /* Stub implementation */ diff --git a/openingd/dualopend.c b/openingd/dualopend.c index d6900e831cb8..09a32b022180 100644 --- a/openingd/dualopend.c +++ b/openingd/dualopend.c @@ -431,7 +431,9 @@ static void check_mutual_channel_ready(struct state *state) if (state->channel_ready[LOCAL] && state->channel_ready[REMOTE]) { /* Make sure the hsmd agrees that this outpoint is * sufficiently buried. */ - msg = towire_hsmd_sync_outpoint(NULL, &state->channel->funding); + msg = towire_hsmd_sync_outpoint(NULL, + &state->channel->funding.txid, + state->channel->funding.n); wire_sync_write(HSM_FD, take(msg)); msg = wire_sync_read(tmpctx, HSM_FD); if (!fromwire_hsmd_sync_outpoint_reply(msg))