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

Function disable_if_dying

plugins/libplugin-pay.c:1399–1408  ·  view source on GitHub ↗

gossipd ignores updates for dying channels: don't retry with stale ones */

Source from the content-addressed store, hash-verified

1397
1398/* gossipd ignores updates for dying channels: don't retry with stale ones */
1399static void disable_if_dying(struct payment *p, const struct route_hop *errchan)
1400{
1401 const struct gossmap *gossmap = get_raw_gossmap(p);
1402 const struct gossmap_chan *c = gossmap_find_chan(gossmap, &errchan->scid);
1403
1404 if (c && gossmap_chan_is_dying(gossmap, c))
1405 channel_hints_update(p, errchan->scid, errchan->direction,
1406 false, false, NULL, errchan->capacity,
1407 NULL);
1408}
1409
1410static struct command_result *
1411handle_intermediate_failure(struct command *cmd,

Callers 1

Calls 4

get_raw_gossmapFunction · 0.85
gossmap_find_chanFunction · 0.85
gossmap_chan_is_dyingFunction · 0.85
channel_hints_updateFunction · 0.85

Tested by

no test coverage detected