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

Function record_mutual_close

onchaind/onchaind.c:273–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273static void record_mutual_close(const struct tx_parts *tx,
274 const u8 *remote_scriptpubkey,
275 u32 blockheight)
276{
277 /* FIXME: if we ever change how closes happen, this will
278 * need to be updated as there's no longer 1 output
279 * per peer */
280 for (size_t i = 0; i < tal_count(tx->outputs); i++) {
281 struct bitcoin_outpoint out;
282
283 if (!wally_tx_output_scripteq(tx->outputs[i],
284 remote_scriptpubkey))
285 continue;
286
287 out.n = i;
288 out.txid = tx->txid;
289 record_external_output(&out,
290 amount_sat(tx->outputs[i]->satoshi),
291 blockheight,
292 TO_THEM);
293 break;
294 }
295}
296
297
298static void record_channel_deposit(struct tracked_output *out,

Callers 1

mainFunction · 0.85

Calls 3

wally_tx_output_scripteqFunction · 0.85
record_external_outputFunction · 0.85
amount_satClass · 0.70

Tested by

no test coverage detected