| 62 | } |
| 63 | |
| 64 | struct plugins *plugins_new(const tal_t *ctx, struct log_book *log_book, |
| 65 | struct lightningd *ld) |
| 66 | { |
| 67 | struct plugins *p; |
| 68 | p = tal(ctx, struct plugins); |
| 69 | list_head_init(&p->plugins); |
| 70 | p->log = new_logger(p, log_book, NULL, "plugin-manager"); |
| 71 | p->ld = ld; |
| 72 | p->startup = true; |
| 73 | p->plugin_cmds = tal_arr(p, struct plugin_command *, 0); |
| 74 | p->blacklist = tal_arr(p, const char *, 0); |
| 75 | p->plugin_idx = 0; |
| 76 | p->dev_builtin_plugins_unimportant = false; |
| 77 | p->want_db_transaction = true; |
| 78 | p->dev_save_io = NULL; |
| 79 | p->subscriptions = tal(p, struct plugin_subscription_htable); |
| 80 | plugin_subscription_htable_init(p->subscriptions); |
| 81 | |
| 82 | return p; |
| 83 | } |
| 84 | |
| 85 | /* Check that all the plugin's subscriptions are actually for known |
| 86 | * notification topics. Emit a warning if that's not the case, but |
no test coverage detected