| 1290 | } |
| 1291 | |
| 1292 | static struct amount_msat attempt_fee(const struct attempt *attempt) |
| 1293 | { |
| 1294 | const size_t len = tal_count(attempt->hops); |
| 1295 | if (len == 0) |
| 1296 | return AMOUNT_MSAT(0); |
| 1297 | struct amount_msat fee; |
| 1298 | if (!amount_msat_sub(&fee, attempt->hops[0].amount_in, |
| 1299 | attempt->hops[len - 1].amount_out)) |
| 1300 | abort(); |
| 1301 | return fee; |
| 1302 | } |
| 1303 | |
| 1304 | static struct amount_msat total_fees_being_sent(const struct payment *payment) |
| 1305 | { |
no test coverage detected