Skip to content

bug: overlapping spark sends of one invoice both go out #1895

Closed

Description

@ovitrif

Description

Two overlapping Spark sends of one invoice can both go out. LightningRepo.admitSend admits a send whenever the key is free or held by the same rail, so a second Spark send of an invoice that is already in flight on Spark is admitted. Spark doesn't refuse a repeat.

This was already the case on master. #1893 widens the window, because a pre-restore invoice now waits for the operators' answer before the send.

To do

Refuse a second Spark send of a hash that already has a Spark send admitted or recorded. LDK refuses its own repeats, so the node rail can keep counting as it does now. Add a test that overlaps two Spark sends of one invoice and expects exactly one to reach the rail.

Twin: synonymdev/bitkit-ios (same gap in LightningService.admitSend). Found from greptile's review in synonymdev/bitkit-ios#1312 (comment).

Activity

  1. changed the title [-]fix: overlapping spark sends of one invoice both go out[/-] [+]bug: overlapping spark sends of one invoice both go out[/+] on Nov 12, 2026
  2. added this to the 3.2.0 milestone on Nov 12, 2026
  3. ovitrif commented on Nov 12, 2026

    @ovitrif
    CollaboratorAuthor

    Milestone 3.2.0: this issue is a bug in Spark sends, which ship in 3.2.0.

  4. self-assigned this
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions