From 7ccb77269d0bc5e7387c96548ac12fb0a06acf29 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Fri, 20 Oct 2023 07:13:22 +0800 Subject: [PATCH] routing: log preimage when it's failed to be saved to db --- routing/payment_lifecycle.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routing/payment_lifecycle.go b/routing/payment_lifecycle.go index fdaa68042..9853f8fd9 100644 --- a/routing/payment_lifecycle.go +++ b/routing/payment_lifecycle.go @@ -558,7 +558,9 @@ func (p *paymentLifecycle) collectResult(attempt *channeldb.HTLCAttempt) ( }, ) if err != nil { - log.Errorf("Unable to settle payment attempt: %v", err) + log.Errorf("Error settling attempt %v for payment %v with "+ + "preimage %v: %v", attempt.AttemptID, p.identifier, + result.Preimage, err) // We won't mark the attempt as failed since we already have // the preimage.