Skip to content

Commit f992eb1

Browse files
committed
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 <rusty@rustcorp.com.au>
1 parent 8d819d3 commit f992eb1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

openingd/common.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,28 +241,22 @@ void validate_initial_commitment_signature(int hsm_fd,
241241
struct bitcoin_tx *tx,
242242
struct bitcoin_signature *sig)
243243
{
244-
struct existing_htlc **htlcs;
245-
struct bitcoin_signature *htlc_sigs;
246244
u32 feerate;
247245
u64 commit_num;
248246
const u8 *msg;
249247
struct secret *old_secret;
250248
struct pubkey next_point;
251249

252250
/* Validate the counterparty's signature. */
253-
htlcs = tal_arr(NULL, struct existing_htlc *, 0);
254-
htlc_sigs = tal_arr(NULL, struct bitcoin_signature, 0);
255251
feerate = 0; /* unused since there are no htlcs */
256252
commit_num = 0;
257253
msg = towire_hsmd_validate_commitment_tx(NULL,
258254
tx,
259-
(const struct simple_htlc **) htlcs,
255+
NULL, /* No htlcs */
260256
commit_num,
261257
feerate,
262258
sig,
263-
htlc_sigs);
264-
tal_free(htlc_sigs);
265-
tal_free(htlcs);
259+
NULL /* No htlc_sigs */);
266260
wire_sync_write(hsm_fd, take(msg));
267261
msg = wire_sync_read(tmpctx, hsm_fd);
268262
if (!fromwire_hsmd_validate_commitment_tx_reply(tmpctx, msg, &old_secret, &next_point))

0 commit comments

Comments
 (0)