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

Function new_utxo_description

plugins/bkpr/descriptions.c:147–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147static struct utxo_desc *
148new_utxo_description(struct descriptions *descriptions,
149 const struct bitcoin_outpoint *outpoint,
150 const char *desc TAKES)
151{
152 struct utxo_desc *ud;
153
154 ud = utxo_desc_htable_get(descriptions->by_utxo, outpoint);
155 if (ud) {
156 tal_free(ud->desc);
157 ud->desc = tal_strdup(ud, desc);
158 } else {
159 ud = tal(descriptions->by_utxo, struct utxo_desc);
160 ud->outp = *outpoint;
161 ud->desc = tal_strdup(ud, desc);
162 utxo_desc_htable_add(descriptions->by_utxo, ud);
163 }
164 return ud;
165}
166
167void add_utxo_description(struct command *cmd,
168 struct bkpr *bkpr,

Callers 2

add_utxo_descriptionFunction · 0.85
init_descriptionsFunction · 0.85

Calls 1

tal_freeFunction · 0.85

Tested by

no test coverage detected