mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
offers: fix overzealous BROKEN log.
sendonionmessage can fail when sending a reply, either because the reply had a bad first peer, or because it went offline. The latter happens in CI, which is how I found this. Also fixed typo "onio" -> "onion". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -31,8 +31,10 @@ static struct command_result *sendonionmessage_error(struct command *cmd,
|
|||||||
const jsmntok_t *err,
|
const jsmntok_t *err,
|
||||||
void *unused)
|
void *unused)
|
||||||
{
|
{
|
||||||
plugin_log(cmd->plugin, LOG_BROKEN,
|
/* This can happen if the peer goes offline or wasn't directly
|
||||||
"sendoniomessage gave JSON error: %.*s",
|
* connected: "Unknown first peer" */
|
||||||
|
plugin_log(cmd->plugin, LOG_DBG,
|
||||||
|
"sendonionmessage gave JSON error: %.*s",
|
||||||
json_tok_full_len(err),
|
json_tok_full_len(err),
|
||||||
json_tok_full(buf, err));
|
json_tok_full(buf, err));
|
||||||
return command_hook_success(cmd);
|
return command_hook_success(cmd);
|
||||||
|
|||||||
Reference in New Issue
Block a user