MCPcopy Create free account
hub / github.com/ElementsProject/lightning / uncertainty_commit_htlcs

Function uncertainty_commit_htlcs

plugins/renepay/uncertainty.c:39–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void 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
58void uncertainty_channel_can_send(struct uncertainty *uncertainty,
59 struct short_channel_id scid, int direction)

Callers 3

get_routesFunction · 0.85
route_pending_registerFunction · 0.85
mainFunction · 0.85

Calls 1

chan_extra_commit_htlcFunction · 0.85

Tested by 1

mainFunction · 0.68