MCPcopy Create free account
hub / github.com/ElementsProject/lightning / new_tracked_output

Function new_tracked_output

onchaind/onchaind.c:605–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605static struct tracked_output *
606new_tracked_output(struct tracked_output ***outs,
607 const struct bitcoin_outpoint *outpoint,
608 u32 tx_blockheight,
609 enum tx_type tx_type,
610 struct amount_sat sat,
611 enum output_type output_type,
612 const struct htlc_stub *htlc,
613 const u8 *wscript,
614 const struct bitcoin_signature *remote_htlc_sig)
615{
616 struct tracked_output *out = tal(*outs, struct tracked_output);
617
618 status_debug("Tracking output %s: %s/%s",
619 fmt_bitcoin_outpoint(tmpctx, outpoint),
620 tx_type_name(tx_type),
621 output_type_name(output_type));
622
623 out->tx_type = tx_type;
624 out->outpoint = *outpoint;
625 out->tx_blockheight = tx_blockheight;
626 out->depth = 0;
627 out->sat = sat;
628 out->output_type = output_type;
629 out->proposal = NULL;
630 out->resolved = NULL;
631 out->fate = THEIR_HTLC_UNDECIDED;
632 if (htlc)
633 out->htlc = *htlc;
634 out->wscript = tal_steal(out, wscript);
635 out->remote_htlc_sig = tal_dup_or_null(out, struct bitcoin_signature,
636 remote_htlc_sig);
637
638 tal_arr_expand(outs, out);
639
640 return out;
641}
642
643static void ignore_output(struct tracked_output *out)
644{

Callers 9

resolve_htlc_txFunction · 0.85
steal_htlc_txFunction · 0.85
our_unilateral_to_usFunction · 0.85
handle_our_unilateralFunction · 0.85
their_unilateral_localFunction · 0.85
handle_their_cheatFunction · 0.85
handle_their_unilateralFunction · 0.85
mainFunction · 0.85

Calls 3

fmt_bitcoin_outpointFunction · 0.85
tx_type_nameFunction · 0.85
output_type_nameFunction · 0.85

Tested by

no test coverage detected