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

Function payment_warn_chan

plugins/renepay/payment.c:338–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338void payment_warn_chan(struct payment *p, struct short_channel_id_dir scidd,
339 enum log_level lvl, const char *fmt, ...)
340{
341 assert(p);
342 assert(p->disabledmap);
343 va_list ap;
344 const char *str;
345
346 va_start(ap, fmt);
347 str = tal_vfmt(tmpctx, fmt, ap);
348 va_end(ap);
349
350 if (disabledmap_channel_is_warned(p->disabledmap, scidd)) {
351 payment_disable_chan(p, scidd, lvl, "%s, channel warned twice",
352 str);
353 return;
354 }
355
356 payment_note(
357 p, lvl, "flagged for warning %s: %s, next time it will be disabled",
358 fmt_short_channel_id_dir(tmpctx, &scidd), str);
359 disabledmap_warn_channel(p->disabledmap, scidd);
360}
361
362void payment_disable_node(struct payment *p, struct node_id node,
363 enum log_level lvl, const char *fmt, ...)

Callers 1

handle_failureFunction · 0.85

Calls 5

payment_disable_chanFunction · 0.85
payment_noteFunction · 0.85
fmt_short_channel_id_dirFunction · 0.85
disabledmap_warn_channelFunction · 0.70

Tested by

no test coverage detected