| 88 | } |
| 89 | |
| 90 | struct amount_msat flow_fee(const struct flow *flow) |
| 91 | { |
| 92 | struct amount_msat spend = flow_spend(flow); |
| 93 | struct amount_msat fee; |
| 94 | if (!amount_msat_sub(&fee, spend, flow->delivers)) { |
| 95 | child_err("Could not subtract %s from %s for fee", |
| 96 | fmt_amount_msat(tmpctx, flow->delivers), |
| 97 | fmt_amount_msat(tmpctx, spend)); |
| 98 | } |
| 99 | |
| 100 | return fee; |
| 101 | } |
| 102 | |
| 103 | struct amount_msat flowset_fee(struct flow **flows) |
| 104 | { |
no test coverage detected