From 24ee5d043700a4b42372f75dae96c020487f974f Mon Sep 17 00:00:00 2001 From: ZmnSCPxj Date: Fri, 9 Mar 2018 12:11:06 +0000 Subject: [PATCH] pay: Store payment on failure. --- lightningd/pay.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lightningd/pay.c b/lightningd/pay.c index 5970a0b8b..e5d853b67 100644 --- a/lightningd/pay.c +++ b/lightningd/pay.c @@ -449,9 +449,7 @@ void payment_failed(struct lightningd *ld, const struct htlc_out *hout, } /* Save to DB */ - /* This may invalidated the payment structure returned, so - * access to payment object should not be done after the - * below call. */ + wallet_payment_store(ld->wallet, &hout->payment_hash); wallet_payment_set_status(ld->wallet, &hout->payment_hash, PAYMENT_FAILED, NULL); wallet_payment_set_failinfo(ld->wallet,