| 101 | } |
| 102 | |
| 103 | struct amount_msat flowset_fee(struct flow **flows) |
| 104 | { |
| 105 | struct amount_msat fee = AMOUNT_MSAT(0); |
| 106 | for (size_t i = 0; i < tal_count(flows); i++) { |
| 107 | struct amount_msat this_fee = flow_fee(flows[i]); |
| 108 | if (!amount_msat_accumulate(&fee, this_fee)) { |
| 109 | child_err("Could not add %s to %s for flowset fee", |
| 110 | fmt_amount_msat(tmpctx, this_fee), |
| 111 | fmt_amount_msat(tmpctx, fee)); |
| 112 | } |
| 113 | } |
| 114 | return fee; |
| 115 | } |
| 116 | |
| 117 | /* Helper to access the half chan at flow index idx */ |
| 118 | const struct half_chan *flow_edge(const struct flow *flow, size_t idx) |
no test coverage detected