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

Function new_tracked_output

onchaind/onchaind.c:575–610  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575static struct tracked_output *
576new_tracked_output(struct tracked_output ***outs,
577 const struct bitcoin_outpoint *outpoint,
578 u32 tx_blockheight,
579 enum tx_type tx_type,
580 struct amount_sat sat,
581 enum output_type output_type,
582 const struct htlc_stub *htlc,
583 const u8 *wscript,
584 const struct bitcoin_signature *remote_htlc_sig)
585{
586 struct tracked_output *out = tal(*outs, struct tracked_output);
587
588 status_debug("Tracking output %s: %s/%s",
589 fmt_bitcoin_outpoint(tmpctx, outpoint),
590 tx_type_name(tx_type),
591 output_type_name(output_type));
592
593 out->tx_type = tx_type;
594 out->outpoint = *outpoint;
595 out->tx_blockheight = tx_blockheight;
596 out->depth = 0;
597 out->sat = sat;
598 out->output_type = output_type;
599 out->proposal = NULL;
600 out->resolved = NULL;
601 if (htlc)
602 out->htlc = *htlc;
603 out->wscript = tal_steal(out, wscript);
604 out->remote_htlc_sig = tal_dup_or_null(out, struct bitcoin_signature,
605 remote_htlc_sig);
606
607 tal_arr_expand(outs, out);
608
609 return out;
610}
611
612static void ignore_output(struct tracked_output *out)
613{

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