Skip to content

bug: late spark failure event ends a retry's hold #1848

Open

Description

@ovitrif

Found in @pwltr's review of #1697 at 5953744 (review).

Behaviour

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

  1. added this to the 3.2.0 milestone on Nov 11, 2026
  2. changed the title [-]fix: late spark failure event ends a retry's hold[/-] [+]bug: late spark failure event ends a retry's hold[/+] on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions