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

Function finalize_sum

plugins/bkpr/onchain_fee.c:331–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331static void finalize_sum(struct fee_sum ***sums,
332 struct fee_sum *sum,
333 struct amount_msat credit,
334 struct amount_msat debit)
335{
336 bool ok;
337 ok = amount_msat_sub(&sum->fees_paid, credit, debit);
338 assert(ok);
339 tal_arr_expand(sums, sum);
340}
341
342/* Add up each account/txid group into a fee_sum */
343static struct fee_sum **fee_sums_by_txid_and_account(const tal_t *ctx,

Callers 1

Calls 1

amount_msat_subFunction · 0.85

Tested by

no test coverage detected