| 71 | } |
| 72 | |
| 73 | struct plugins *plugins_new(const tal_t *ctx, struct log_book *log_book, |
| 74 | struct lightningd *ld) |
| 75 | { |
| 76 | struct plugins *p; |
| 77 | p = tal(ctx, struct plugins); |
| 78 | list_head_init(&p->plugins); |
| 79 | p->log_book = log_book; |
| 80 | p->log = new_log(p, log_book, NULL, "plugin-manager"); |
| 81 | p->ld = ld; |
| 82 | p->startup = true; |
| 83 | p->plugin_cmds = tal_arr(p, struct plugin_command *, 0); |
| 84 | p->blacklist = tal_arr(p, const char *, 0); |
| 85 | p->plugin_idx = 0; |
| 86 | #if DEVELOPER |
| 87 | p->dev_builtin_plugins_unimportant = false; |
| 88 | #endif /* DEVELOPER */ |
| 89 | strmap_init(&p->pending_requests); |
| 90 | memleak_add_helper(p, memleak_help_pending_requests); |
| 91 | |
| 92 | return p; |
| 93 | } |
| 94 | |
| 95 | /* Check that all the plugin's subscriptions are actually for known |
| 96 | * notification topics. Emit a warning if that's not the case, but |
no test coverage detected