Skip to content

Commit b005aab

Browse files
committed
splice: Add call to hsmd_sync_outpoint when mutual splice_locked
1 parent b652750 commit b005aab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

channeld/channeld.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,16 @@ static void check_mutual_splice_locked(struct peer *peer)
751751
status_debug("mutual splice_locked, channel updated to: %s",
752752
type_to_string(tmpctx, struct channel, peer->channel));
753753

754+
/* Make sure the hsmd agrees that this outpoint is
755+
* sufficiently buried. */
756+
const u8 *msg2;
757+
msg2 = towire_hsmd_sync_outpoint(NULL, &inflight->outpoint);
758+
msg2 = hsm_req(tmpctx, take(msg2));
759+
if (!fromwire_hsmd_sync_outpoint_reply(msg2))
760+
status_failed(STATUS_FAIL_HSM_IO,
761+
"Bad hsmd_sync_outpoint_reply: %s",
762+
tal_hex(tmpctx, msg2));
763+
754764
msg = towire_channeld_got_splice_locked(NULL, inflight->amnt,
755765
inflight->splice_amnt,
756766
&inflight->outpoint.txid);

0 commit comments

Comments
 (0)