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

Function add_forward_del_fields

plugins/autoclean.c:511–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511static void add_forward_del_fields(struct out_req *req,
512 const char *buf,
513 const jsmntok_t *t)
514{
515 const jsmntok_t *status = json_get_member(buf, t, "status");
516 const jsmntok_t *inchan = json_get_member(buf, t, "in_channel");
517 const jsmntok_t *inid = json_get_member(buf, t, "in_htlc_id");
518
519 json_add_tok(req->js, "in_channel", inchan, buf);
520 /* This can be missing if it was a forwards record from an old
521 * closed channel in version <= 0.12.1. This is a special value
522 * but we will delete them *all*, resulting in some failures! */
523#ifdef COMPAT_V0121
524 if (!inid)
525 json_add_u64(req->js, "in_htlc_id", -1ULL);
526 else
527#endif
528 json_add_tok(req->js, "in_htlc_id", inid, buf);
529 json_add_tok(req->js, "status", status, buf);
530}
531
532static void add_networkevent_del_fields(struct out_req *req,
533 const char *buf,

Callers

nothing calls this directly

Calls 3

json_get_memberFunction · 0.85
json_add_tokFunction · 0.85
json_add_u64Function · 0.85

Tested by

no test coverage detected