mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
plugin: fix printing of bad plugin responses.
Before: Plugin for invoice_payment returned non-result response "subscriptions": [], "hooks": ["invoice_payment"]}} �V After: Plugin for invoice_payment returned non-result response {"jsonrpc": "2.0", "id": 6, "error": "Error while processing invoice_payment: ValueError(\"invalid literal for int() with base 10: '5.0'\")"} Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
8f9c48254b
commit
695bec531c
@ -54,7 +54,7 @@ static void plugin_hook_callback(const char *buffer, const jsmntok_t *toks,
|
||||
if (!resulttok)
|
||||
fatal("Plugin for %s returned non-result response %.*s",
|
||||
r->hook->name,
|
||||
toks->end - toks->start, buffer + toks->end);
|
||||
toks->end - toks->start, buffer + toks->start);
|
||||
|
||||
db_begin_transaction(r->db);
|
||||
r->hook->response_cb(r->cb_arg, buffer, resulttok);
|
||||
|
Loading…
Reference in New Issue
Block a user