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

Function plugin_notify_progress

plugins/libplugin.c:1959–1976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1957}
1958
1959void plugin_notify_progress(struct command *cmd,
1960 u32 num_stages, u32 stage,
1961 u32 num_progress, u32 progress)
1962{
1963 struct json_stream *js = plugin_notify_start(cmd, "progress");
1964
1965 assert(progress < num_progress);
1966 json_add_u32(js, "num", progress);
1967 json_add_u32(js, "total", num_progress);
1968 if (num_stages > 0) {
1969 assert(stage < num_stages);
1970 json_object_start(js, "stage");
1971 json_add_u32(js, "num", stage);
1972 json_add_u32(js, "total", num_stages);
1973 json_object_end(js);
1974 }
1975 plugin_notify_end(cmd, js);
1976}
1977
1978void NORETURN plugin_exit(struct plugin *p, int exitcode)
1979{

Callers

nothing calls this directly

Calls 5

plugin_notify_startFunction · 0.85
json_add_u32Function · 0.85
json_object_startFunction · 0.85
json_object_endFunction · 0.85
plugin_notify_endFunction · 0.85

Tested by

no test coverage detected