mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +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:
committed by
Christian Decker
parent
8f9c48254b
commit
695bec531c
@@ -54,7 +54,7 @@ static void plugin_hook_callback(const char *buffer, const jsmntok_t *toks,
|
|||||||
if (!resulttok)
|
if (!resulttok)
|
||||||
fatal("Plugin for %s returned non-result response %.*s",
|
fatal("Plugin for %s returned non-result response %.*s",
|
||||||
r->hook->name,
|
r->hook->name,
|
||||||
toks->end - toks->start, buffer + toks->end);
|
toks->end - toks->start, buffer + toks->start);
|
||||||
|
|
||||||
db_begin_transaction(r->db);
|
db_begin_transaction(r->db);
|
||||||
r->hook->response_cb(r->cb_arg, buffer, resulttok);
|
r->hook->response_cb(r->cb_arg, buffer, resulttok);
|
||||||
|
|||||||
Reference in New Issue
Block a user