Skip to content

bug: a node send waiting in its queue pays a contact blocked meanwhile #2130

Backlog

Description

@ovitrif

A Paykit payment request sent on the node is authorized again before its last node-side waits, but not after them. If the contact is blocked or deleted during those waits, the payment still goes out:

  • Lightning: the recheck runs right before the send enters ServiceQueue.LDK, so a block landing while the send waits behind other node work is not seen.
  • On-chain: LightningRepo.sendOnChain rechecks before retainPreparedReceipt, so a change committed during that receipt write still reaches the native broadcast (LightningService).

The block check reads the Paykit SDK (linkedPeers()), which suspends and can't run on the node queue. Covering it needs an authorization the queued step can read, for example a refusal flag ensurePaymentAllowed keeps.

Expected: a contact blocked while a node send waits there is refused before the send, and nothing is sent.

Twin: synonymdev/bitkit-ios#1513
Raised in #2070 (review)

Activity

  1. added this to the 3.3.0 milestone on Nov 26, 2026
  2. added theissue type on Nov 26, 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

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions