| 484 | }; |
| 485 | |
| 486 | static 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 | |
| 501 | static const struct plugin_notification notifications[] = { |
| 502 | { |
nothing calls this directly
no test coverage detected