From 0e59107eeec5ee790056a207b269203b89bb22d6 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 27 Oct 2024 19:34:20 +0900 Subject: [PATCH] Fix tests with LightningPendingPayoutListener overriding automated payouts state changes --- .../Payments/Lightning/LightningPendingPayoutListener.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BTCPayServer/Payments/Lightning/LightningPendingPayoutListener.cs b/BTCPayServer/Payments/Lightning/LightningPendingPayoutListener.cs index 708510ed1..fc9ae63be 100644 --- a/BTCPayServer/Payments/Lightning/LightningPendingPayoutListener.cs +++ b/BTCPayServer/Payments/Lightning/LightningPendingPayoutListener.cs @@ -94,6 +94,9 @@ public class LightningPendingPayoutListener : BaseAsyncService var handler = _payoutHandlers.TryGet(payoutData.GetPayoutMethodId()) as LightningLikePayoutHandler; if (handler is null || handler.PayoutsPaymentProcessing.Contains(payoutData.Id)) continue; + using var tracking = handler.PayoutsPaymentProcessing.StartTracking(); + if (!tracking.TryTrack(payoutData.Id)) + continue; var proof = handler.ParseProof(payoutData) as PayoutLightningBlob; LightningPayment payment = null;