| 37 | } |
| 38 | |
| 39 | void uncertainty_commit_htlcs(struct uncertainty *uncertainty, |
| 40 | const struct route *route) |
| 41 | { |
| 42 | // FIXME: how could we get the route details of a sendpay that we did |
| 43 | // not send? |
| 44 | if (!route->hops) |
| 45 | return; |
| 46 | |
| 47 | const size_t pathlen = tal_count(route->hops); |
| 48 | for (size_t i = 0; i < pathlen; i++) { |
| 49 | const struct route_hop *hop = &route->hops[i]; |
| 50 | struct short_channel_id_dir scidd = {hop->scid, hop->direction}; |
| 51 | |
| 52 | // FIXME: check error |
| 53 | chan_extra_commit_htlc(uncertainty->chan_extra_map, &scidd, |
| 54 | hop->amount); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | void uncertainty_channel_can_send(struct uncertainty *uncertainty, |
| 59 | struct short_channel_id scid, int direction) |