Skip to content

Receiver<Monitor>::check_payment needs rename #1656

Closed

Description

@DanGould

Which crate is this issue for?

payjoin

Motivation

not checking for a payment, checking for transaction broadcast. Payment != detected != settlement. IMO "payment" is best reserved for lightning. If this is looking for the txid of the

Possible solution

candidates for the rename include

  • check_for_counterparty_broadcast
  • detect_session_transaction
  • watch_for_transaction

I'd look at bitcoin core and other places for naming inspiration. This is a matter of taste where I've been expressing settlement ~= payment everywhere it feels important to be consistent. And this function doesn't quite check for confirmed settlement afaiu. It needs to be made clear

This is for payjoin but will knock onto payjoin-ffi. If this can be done before 1.0, great. If not, we'll have to #[deprecate]

Useful Skills

No response

Guidance for new contributors

No response

Activity

  1. added
    good first issueDoes NOT mean "an LLM can do this." Please discuss the constraints and intended approach.
    on Jun 18, 2026
  2. added this to the payjoin-1.0 milestone on Jun 18, 2026
  3. bnKabeer commented on Jun 19, 2026

    @bnKabeer

    lemme give it a try

  4. spacebear21 commented on Jun 19, 2026

    @spacebear21
    Collaborator

    I like the check_for_counterparty_broadcast direction but "counterparty" is vaguely lightning-coded as well, I think we could simplify it to simply check_for_broadcast.

  5. benalleng commented on Jun 22, 2026

    @benalleng
    Collaborator

    Closed by #1661

  6. DanGould commented on Jun 23, 2026

    @DanGould
    MemberAuthor

    I left a comment #1661 (comment)

    Checking for broadcast also seems like a recommendation. It's possible that a monitoring client would want to wait for a confirmation before they mark the Payjoin State machine as successful.

    The other confusing thing about the current comment is that it says transaction "confirmed." So I think the semantics still need a close look and the documentation for the instruction on what method checks on the transition status is labeled with the appropriate verb at least.

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

    good first issueDoes NOT mean "an LLM can do this." Please discuss the constraints and intended approach.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions