You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: late spark failure event ends a retry's hold #1848
A retry of a failed Spark send shares the invoice's payment hash. When the retry's send call fails without an outcome, SparkRepo holds the invoice until a sync after the failure, and the invoice's expiry, settle it. onPayment (SparkRepo.kt) clears that hold by payment hash for any payment event, a failure event included. A failure event that belongs to the earlier attempt and arrives after the retry went uncertain would end the retry's hold. The listing then shows only the earlier FAILED row, so either rail could pay the invoice again while Spark may still finish the retry.
Open
Whether the Breez SDK can deliver an earlier attempt's PaymentFailed after a later send call on the same hash has returned. Duplicate settlement has not been demonstrated.
If it can, clear the hold on a failure event only when the event belongs to the uncertain attempt (for example by payment id or timestamp), and otherwise leave it to the expiry rule in trySettleUncertainSend.
Activity
[-]fix: late spark failure event ends a retry's hold[/-][+]bug: late spark failure event ends a retry's hold[/+]