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

Function bwatch_poll_chain

plugins/bwatch/bwatch.c:309–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309struct command_result *bwatch_poll_chain(struct command *cmd,
310 void *unused UNUSED)
311{
312 struct bwatch *bwatch = bwatch_of(cmd->plugin);
313 struct out_req *req;
314
315 req = jsonrpc_request_start(cmd, "getchaininfo",
316 getchaininfo_done, getchaininfo_failed,
317 NULL);
318 json_add_u32(req->js, "last_height", bwatch->current_height);
319 return send_outreq(req);
320}
321
322/*
323 * ============================================================================

Callers

nothing calls this directly

Calls 3

bwatch_ofFunction · 0.85
json_add_u32Function · 0.85
send_outreqFunction · 0.50

Tested by

no test coverage detected