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
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]
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.
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.
Activity
bnKabeer commentedon Jun 19, 2026
lemme give it a try
spacebear21 commentedon Jun 19, 2026
I like the
check_for_counterparty_broadcastdirection but "counterparty" is vaguely lightning-coded as well, I think we could simplify it to simplycheck_for_broadcast.benalleng commentedon Jun 22, 2026
Closed by #1661
DanGould commentedon Jun 23, 2026
I left a comment #1661 (comment)
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.