mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-20 13:27:36 +02:00
xpay: make sure we report if we ever try to call getroutes with 0msat.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
89ca5aef9f
commit
43130a33be
1 changed files with 7 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include <ccan/tal/str/str.h>
|
||||
#include <common/bolt11.h>
|
||||
#include <common/bolt12.h>
|
||||
#include <common/daemon.h>
|
||||
#include <common/dijkstra.h>
|
||||
#include <common/gossmap.h>
|
||||
#include <common/gossmods_listpeerchannels.h>
|
||||
|
|
@ -1138,6 +1139,12 @@ static struct command_result *getroutes_for(struct command *aux_cmd,
|
|||
const struct pubkey *dst;
|
||||
struct amount_msat maxfee;
|
||||
|
||||
/* I would normally assert here, but we have reports of this happening... */
|
||||
if (amount_msat_is_zero(deliver)) {
|
||||
payment_log(payment, LOG_BROKEN, "getroutes for 0msat!");
|
||||
send_backtrace("getroutes for 0msat!");
|
||||
}
|
||||
|
||||
/* If we get injectpaymentonion responses, they can wait */
|
||||
payment->amount_being_routed = deliver;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue