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

Function wait_done

plugins/autoclean.c:643–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

641}
642
643static struct command_result *wait_done(struct command *cmd,
644 const char *method,
645 const char *buf,
646 const jsmntok_t *result,
647 struct per_subsystem *ps)
648{
649 const char *err;
650
651 err = json_scan(tmpctx, buf, result, "{created:%}",
652 JSON_SCAN(json_to_u64, &ps->max));
653 if (err)
654 plugin_err(plugin, "Failed parsing wait response: (%s): '%.*s'",
655 err,
656 json_tok_full_len(result),
657 json_tok_full(buf, result));
658
659 /* We do three of these, make sure they're all complete. */
660 assert(ps->cinfo->cleanup_reqs_remaining != 0);
661 if (--ps->cinfo->cleanup_reqs_remaining > 0)
662 return command_still_pending(ps->cinfo->cmd);
663
664 return do_clean(ps->cinfo);
665}
666
667static struct command_result *start_clean(struct clean_info *cinfo)
668{

Callers

nothing calls this directly

Calls 6

do_cleanFunction · 0.85
plugin_errFunction · 0.70
command_still_pendingFunction · 0.70
json_scanFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected