| 44 | } |
| 45 | |
| 46 | static const char *state_desc(const struct plugin *plugin) |
| 47 | { |
| 48 | switch (plugin->plugin_state) { |
| 49 | case UNCONFIGURED: |
| 50 | return "unconfigured"; |
| 51 | case AWAITING_GETMANIFEST_RESPONSE: |
| 52 | return "before replying to getmanifest"; |
| 53 | case NEEDS_INIT: |
| 54 | return "before we sent init"; |
| 55 | case AWAITING_INIT_RESPONSE: |
| 56 | return "before replying to init"; |
| 57 | case INIT_COMPLETE: |
| 58 | return "during normal operation"; |
| 59 | } |
| 60 | fatal("Invalid plugin state %i for %s", |
| 61 | plugin->plugin_state, plugin->cmd); |
| 62 | } |
| 63 | |
| 64 | struct plugins *plugins_new(const tal_t *ctx, struct log_book *log_book, |
| 65 | struct lightningd *ld) |
no test coverage detected