MCPcopy Create free account
hub / github.com/ElementsProject/lightning / bitcoin_plugin_error

Function bitcoin_plugin_error

lightningd/bitcoind.c:102–118  ·  view source on GitHub ↗

Our Bitcoin backend plugin gave us a bad response. We can't recover. */

Source from the content-addressed store, hash-verified

100
101/* Our Bitcoin backend plugin gave us a bad response. We can't recover. */
102static 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. */

Callers 5

estimatefees_callbackFunction · 0.85
sendrawtx_callbackFunction · 0.85
getchaininfo_callbackFunction · 0.85
getutxout_callbackFunction · 0.85

Calls 1

fatalFunction · 0.70

Tested by

no test coverage detected