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

Function record_mutual_close

onchaind/onchaind.c:256–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256static void record_mutual_close(const struct tx_parts *tx,
257 const u8 *remote_scriptpubkey,
258 u32 blockheight)
259{
260 /* FIXME: if we ever change how closes happen, this will
261 * need to be updated as there's no longer 1 output
262 * per peer */
263 for (size_t i = 0; i < tal_count(tx->outputs); i++) {
264 struct bitcoin_outpoint out;
265
266 if (!wally_tx_output_scripteq(tx->outputs[i],
267 remote_scriptpubkey))
268 continue;
269
270 out.n = i;
271 out.txid = tx->txid;
272 record_external_output(&out,
273 amount_sat(tx->outputs[i]->satoshi),
274 blockheight,
275 mk_mvt_tags(MVT_TO_THEM));
276 break;
277 }
278}
279
280
281static 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