diff --git a/invoices/invoiceregistry.go b/invoices/invoiceregistry.go index dcaa9898..e6e4093b 100644 --- a/invoices/invoiceregistry.go +++ b/invoices/invoiceregistry.go @@ -707,8 +707,12 @@ func (i *InvoiceRegistry) processKeySend(ctx invoiceUpdateCtx) error { // Cancel htlc is preimage is invalid. preimage, err := lntypes.MakePreimage(preimageSlice) - if err != nil || preimage.Hash() != ctx.hash { - return errors.New("invalid keysend preimage") + if err != nil { + return err + } + if preimage.Hash() != ctx.hash { + return fmt.Errorf("invalid keysend preimage %v for hash %v", + preimage, ctx.hash) } // Only allow keysend for non-mpp payments.