From f992eb1e72521648b0c5e7912b56ca6c40cf2587 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 6 May 2025 05:17:46 +0930 Subject: [PATCH] openingd: don't cast existing_htlc array to simple_htlc array. It's NULL, but the case covered up that it's the wrong type! Signed-off-by: Rusty Russell --- openingd/common.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/openingd/common.c b/openingd/common.c index 00f33da45..78c72f908 100644 --- a/openingd/common.c +++ b/openingd/common.c @@ -241,8 +241,6 @@ void validate_initial_commitment_signature(int hsm_fd, struct bitcoin_tx *tx, struct bitcoin_signature *sig) { - struct existing_htlc **htlcs; - struct bitcoin_signature *htlc_sigs; u32 feerate; u64 commit_num; const u8 *msg; @@ -250,19 +248,15 @@ void validate_initial_commitment_signature(int hsm_fd, struct pubkey next_point; /* Validate the counterparty's signature. */ - htlcs = tal_arr(NULL, struct existing_htlc *, 0); - htlc_sigs = tal_arr(NULL, struct bitcoin_signature, 0); feerate = 0; /* unused since there are no htlcs */ commit_num = 0; msg = towire_hsmd_validate_commitment_tx(NULL, tx, - (const struct simple_htlc **) htlcs, + NULL, /* No htlcs */ commit_num, feerate, sig, - htlc_sigs); - tal_free(htlc_sigs); - tal_free(htlcs); + NULL /* No htlc_sigs */); wire_sync_write(hsm_fd, take(msg)); msg = wire_sync_read(tmpctx, hsm_fd); if (!fromwire_hsmd_validate_commitment_tx_reply(tmpctx, msg, &old_secret, &next_point))