routing: Ensure to not fail a payment twice

This commit is contained in:
ziggie committed 2025-03-24 09:17:09 -05:00
1 parent 5d921723b1
commit 4bdd37534e
3 files changed
+35 -44

No files matched your search

+3
View File
@@ -282,6 +282,9 @@ func (p *controlTower) FetchPayment(paymentHash lntypes.Hash) (
// reason the payment failed. After invoking this method, InitPayment should
// return nil on its next call for this payment hash, allowing the switch to
// make a subsequent payment.
//
// NOTE: This method will overwrite the failure reason if the payment is already
// failed.
func (p *controlTower) FailPayment(paymentHash lntypes.Hash,
reason channeldb.FailureReason) error {