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

Function disabledmap_add_channel

plugins/renepay/disabledmap.c:46–60  ·  view source on GitHub ↗

FIXME: check success

Source from the content-addressed store, hash-verified

44
45// FIXME: check success
46void disabledmap_add_channel(struct disabledmap *p,
47 struct short_channel_id_dir scidd)
48{
49 struct short_channel_id_dir *ptr_scidd =
50 scidd_map_get(p->disabled_map, &scidd);
51 if (ptr_scidd) {
52 /* htable allows for duplicates, but we don't want duplicates.
53 */
54 return;
55 }
56 ptr_scidd =
57 tal_dup(p->disabled_ctx, struct short_channel_id_dir, &scidd);
58 scidd_map_add(p->disabled_map, ptr_scidd);
59 tal_add_destructor2(ptr_scidd, remove_scidd, p->disabled_map);
60}
61
62// FIXME: check success
63void disabledmap_warn_channel(struct disabledmap *p,

Callers 3

payment_set_constraintsFunction · 0.70
payment_disable_chanFunction · 0.70
channelfilter_cbFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected