mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 01:32:34 +01:00
fetchinvoice: don't abort() if we try to fetch an invoice from ourselves.
blindedpath.c does: ``` size_t num = tal_count(route); if (!num) abort(); ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
d953c68d58
commit
1be4d42ca3
1 changed files with 5 additions and 0 deletions
|
@ -602,6 +602,11 @@ static struct command_result *send_message(struct command *cmd,
|
|||
}
|
||||
}
|
||||
|
||||
/* FIXME: Maybe we should allow this? */
|
||||
if (tal_bytelen(backwards) == 0)
|
||||
return command_fail(cmd, PAY_ROUTE_NOT_FOUND,
|
||||
"Refusing to talk to ourselves");
|
||||
|
||||
/* Ok, now make reply for onion_message */
|
||||
path = make_blindedpath(tmpctx, backwards, &blinding,
|
||||
&sent->reply_blinding);
|
||||
|
|
Loading…
Add table
Reference in a new issue