lightningd: don't crash when we get a bogus estimatefees subfield.
We hand "estimatefees.feerate_floor" as method, for example, and then crash instead of reporting the plugin which gave us the bad answer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
5afd0ab6bb
commit
81cfd3799e
|
@ -113,9 +113,9 @@ static void bitcoin_plugin_error(struct bitcoind *bitcoind, const char *buf,
|
|||
reason = tal_vfmt(NULL, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
p = strmap_get(&bitcoind->pluginsmap, method);
|
||||
p = strmap_getn(&bitcoind->pluginsmap, method, strcspn(method, "."));
|
||||
fatal("%s error: bad response to %s (%s), response was %.*s",
|
||||
p->cmd, method, reason,
|
||||
p ? p->cmd : "UNKNOWN CALL", method, reason,
|
||||
toks->end - toks->start, buf + toks->start);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue