Our Bitcoin backend plugin gave us a bad response. We can't recover. */
| 94 | |
| 95 | /* Our Bitcoin backend plugin gave us a bad response. We can't recover. */ |
| 96 | static void NORETURN |
| 97 | bitcoin_plugin_error(struct bitcoind *bitcoind, const char *buf, |
| 98 | const jsmntok_t *toks, const char *method, |
| 99 | const char *fmt, ...) |
| 100 | { |
| 101 | va_list ap; |
| 102 | char *reason; |
| 103 | struct plugin *p; |
| 104 | |
| 105 | va_start(ap, fmt); |
| 106 | reason = tal_vfmt(NULL, fmt, ap); |
| 107 | va_end(ap); |
| 108 | |
| 109 | p = strmap_getn(&bitcoind->pluginsmap, method, strcspn(method, ".")); |
| 110 | fatal("%s error: bad response to %s (%s), response was %.*s", |
| 111 | p ? p->cmd : "UNKNOWN CALL", method, reason, |
| 112 | toks->end - toks->start, buf + toks->start); |
| 113 | } |
| 114 | |
| 115 | /* Check response for error (fatal if found) and return result token (fatal if not found). */ |
| 116 | static const jsmntok_t *get_bitcoin_result(struct bitcoind *bitcoind, |
no test coverage detected