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

Function new_tracked_output

onchaind/onchaind.c:960–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

958}
959
960static struct tracked_output *
961new_tracked_output(struct tracked_output ***outs,
962 const struct bitcoin_outpoint *outpoint,
963 u32 tx_blockheight,
964 enum tx_type tx_type,
965 struct amount_sat sat,
966 enum output_type output_type,
967 const struct htlc_stub *htlc,
968 const u8 *wscript,
969 const struct bitcoin_signature *remote_htlc_sig TAKES)
970{
971 struct tracked_output *out = tal(*outs, struct tracked_output);
972
973 status_debug("Tracking output %s: %s/%s",
974 type_to_string(tmpctx, struct bitcoin_outpoint, outpoint),
975 tx_type_name(tx_type),
976 output_type_name(output_type));
977
978 out->tx_type = tx_type;
979 out->outpoint = *outpoint;
980 out->tx_blockheight = tx_blockheight;
981 out->depth = 0;
982 out->sat = sat;
983 out->output_type = output_type;
984 out->proposal = NULL;
985 out->resolved = NULL;
986 if (htlc)
987 out->htlc = *htlc;
988 out->wscript = tal_steal(out, wscript);
989 out->remote_htlc_sig = tal_dup_or_null(out, struct bitcoin_signature,
990 remote_htlc_sig);
991
992 tal_arr_expand(outs, out);
993
994 return out;
995}
996
997static void ignore_output(struct tracked_output *out)
998{

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

tx_type_nameFunction · 0.85
output_type_nameFunction · 0.85
type_to_stringClass · 0.50

Tested by

no test coverage detected