Skip to content

Allow cancel on closed sessions to reprint fallback tx#1673

Open
benalleng wants to merge 2 commits into
payjoin:masterfrom
benalleng:cancel-semantics
Open

Allow cancel on closed sessions to reprint fallback tx#1673
benalleng wants to merge 2 commits into
payjoin:masterfrom
benalleng:cancel-semantics

Conversation

@benalleng

@benalleng benalleng commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Closes #1605

This adds the ability to run cancel on already closed sessions to re-print the fallback tx to be broadcast. This addresses a failure state where a closed session could not access its fallback tx if it was not automatically broadcast.

Coded with help from GLM-5.2

Pull Request Checklist

Please confirm the following before requesting review:

@coveralls

coveralls commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 28064211352

Coverage decreased (-0.01%) to 85.194%

Details

  • Coverage decreased (-0.01%) from the base build.
  • Patch coverage: 8 uncovered changes across 2 files (18 of 26 lines covered, 69.23%).
  • 2 coverage regressions across 1 file.

Uncovered Changes

File Changed Covered %
payjoin-cli/src/app/v2/mod.rs 8 2 25.0%
payjoin-cli/src/db/v2.rs 18 16 88.89%

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
payjoin-cli/src/app/v2/mod.rs 2 50.66%

Coverage Stats

Coverage Status
Relevant Lines: 14771
Covered Lines: 12584
Line Coverage: 85.19%
Coverage Strength: 369.67 hits per line

💛 - Coveralls

Print the fallback tx hex from SessionHistory::fallback_tx() in the
Closed(Aborted) arm of cancel_sender_session and cancel_receiver_session.
@benalleng benalleng marked this pull request as ready for review June 23, 2026 23:34
@benalleng benalleng changed the title Cancel semantics Allow cancel on closed sessions to reprint fallback tx Jun 23, 2026
@benalleng benalleng requested a review from spacebear21 June 23, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does the payjoin-cli cancel have the correct semantics?

2 participants