| 329 | } |
| 330 | |
| 331 | static 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 */ |
| 343 | static struct fee_sum **fee_sums_by_txid_and_account(const tal_t *ctx, |
no test coverage detected