Our Bitcoin backend plugin gave us a bad response. We can't recover. */
| 100 | |
| 101 | /* Our Bitcoin backend plugin gave us a bad response. We can't recover. */ |
| 102 | static void bitcoin_plugin_error(struct bitcoind *bitcoind, const char *buf, |
| 103 | const jsmntok_t *toks, const char *method, |
| 104 | const char *fmt, ...) |
| 105 | { |
| 106 | va_list ap; |
| 107 | char *reason; |
| 108 | struct plugin *p; |
| 109 | |
| 110 | va_start(ap, fmt); |
| 111 | reason = tal_vfmt(NULL, fmt, ap); |
| 112 | va_end(ap); |
| 113 | |
| 114 | p = strmap_get(&bitcoind->pluginsmap, method); |
| 115 | fatal("%s error: bad response to %s (%s), response was %.*s", |
| 116 | p->cmd, method, reason, |
| 117 | toks->end - toks->start, buf + toks->start); |
| 118 | } |
| 119 | |
| 120 | /* Send a request to the Bitcoin plugin which registered that method, |
| 121 | * if it's still alive. */ |
no test coverage detected