| 390 | } |
| 391 | |
| 392 | bool flowset_fee(struct amount_msat *ret, struct flow **flows) |
| 393 | { |
| 394 | assert(ret); |
| 395 | assert(flows); |
| 396 | struct amount_msat fee = AMOUNT_MSAT(0); |
| 397 | for (size_t i = 0; i < tal_count(flows); i++) { |
| 398 | struct amount_msat this_fee; |
| 399 | if (!flow_fee(&this_fee, flows[i])) |
| 400 | return false; |
| 401 | if (!amount_msat_add(&fee, this_fee, fee)) |
| 402 | return false; |
| 403 | } |
| 404 | *ret = fee; |
| 405 | return true; |
| 406 | } |
| 407 | |
| 408 | /* Helper to access the half chan at flow index idx */ |
| 409 | const struct half_chan *flow_edge(const struct flow *flow, size_t idx) |
no test coverage detected