| 53 | #endif /* DEVELOPER */ |
| 54 | |
| 55 | static const char *state_desc(const struct plugin *plugin) |
| 56 | { |
| 57 | switch (plugin->plugin_state) { |
| 58 | case UNCONFIGURED: |
| 59 | return "unconfigured"; |
| 60 | case AWAITING_GETMANIFEST_RESPONSE: |
| 61 | return "before replying to getmanifest"; |
| 62 | case NEEDS_INIT: |
| 63 | return "before we sent init"; |
| 64 | case AWAITING_INIT_RESPONSE: |
| 65 | return "before replying to init"; |
| 66 | case INIT_COMPLETE: |
| 67 | return "during normal operation"; |
| 68 | } |
| 69 | fatal("Invalid plugin state %i for %s", |
| 70 | plugin->plugin_state, plugin->cmd); |
| 71 | } |
| 72 | |
| 73 | struct plugins *plugins_new(const tal_t *ctx, struct log_book *log_book, |
| 74 | struct lightningd *ld) |
no test coverage detected