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

Function block_added_notify

plugins/offers.c:486–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484};
485
486static struct command_result *block_added_notify(struct command *cmd,
487 const char *buf,
488 const jsmntok_t *params)
489{
490 struct offers_data *od = get_offers_data(cmd->plugin);
491 const char *err = json_scan(cmd, buf, params, "{block_added:{height:%}}",
492 JSON_SCAN(json_to_u32, &od->blockheight));
493 if (err)
494 plugin_err(cmd->plugin, "Failed to parse block_added (%.*s): %s",
495 json_tok_full_len(params),
496 json_tok_full(buf, params),
497 err);
498 return notification_handled(cmd);
499}
500
501static const struct plugin_notification notifications[] = {
502 {

Callers

nothing calls this directly

Calls 6

get_offers_dataFunction · 0.85
plugin_errFunction · 0.70
notification_handledFunction · 0.70
json_scanFunction · 0.50
json_tok_full_lenFunction · 0.50
json_tok_fullFunction · 0.50

Tested by

no test coverage detected