Skip to content

Commit c92c384

Browse files
rustyrussellendothermicdev
authored andcommitted
onchaind: fix crash if we enounter a tx with no witness.
This can happen if a descendent tx has no witness and we don't tell the main daemon in time that we're not iterested. Fixes: #8133 Changelog-Fixed: lightningd: onchaind crash when seeing unrelated txs (usually when catching up with old closes) Signed-off-by: Rusty Russell <[email protected]>
1 parent 1e5a577 commit c92c384

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

onchaind/onchaind.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ static bool resolved_by_proposal(struct tracked_output *out,
774774
return false;
775775

776776
input = which_input_spends(tx_parts, &out->outpoint);
777-
if (!input)
777+
if (!input || !input->witness)
778778
return false;
779779
if (!onchain_witness_element_matches(out->proposal->welements, input))
780780
return false;

0 commit comments

Comments
 (0)