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

Function getchaininfo_done

plugins/xpay/xpay.c:2905–2921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2903}
2904
2905static struct command_result *getchaininfo_done(struct command *aux_cmd,
2906 const char *method,
2907 const char *buf,
2908 const jsmntok_t *result,
2909 void *unused)
2910{
2911 struct xpay *xpay = xpay_of(aux_cmd->plugin);
2912
2913 /* We use headercount from the backend, in case we're still syncing */
2914 if (!json_to_u32(buf, json_get_member(buf, result, "headercount"),
2915 &xpay->blockheight)) {
2916 plugin_err(aux_cmd->plugin, "Bad getchaininfo '%.*s'",
2917 json_tok_full_len(result),
2918 json_tok_full(buf, result));
2919 }
2920 return aux_command_done(aux_cmd);
2921}
2922
2923static struct command_result *getinfo_done(struct command *aux_cmd,
2924 const char *method,

Callers

nothing calls this directly

Calls 7

xpay_ofFunction · 0.85
json_get_memberFunction · 0.85
aux_command_doneFunction · 0.85
json_to_u32Function · 0.50
plugin_errFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected