Move extract_fallback_tx to MaybeInputsOwned#801
Merged
spacebear21 merged 1 commit intopayjoin:masterfrom Jun 24, 2025
Merged
Conversation
Collaborator
Pull Request Test Coverage Report for Build 15860337778Details
💛 - Coveralls |
Per BIP-77: > At any point, either party may choose to broadcast the fallback > transaction described by the Original PSBT instead of proceeding. However, the fallback transaction available at the `UncheckedProposal` typestate may not be "broadcastable". Only after transitioning to `MaybeInputsOwned` via `check_broadcast_suitability` can we determine with high confidence that the fallback is valid for broadcast. Related PR: [payjoin#799](payjoin#799)
65970d8 to
e5d1855
Compare
DanGould
approved these changes
Jun 24, 2025
Comment on lines
+123
to
+124
| /// If you are implementing an interactive payment processor, you should get extract the original | ||
| /// transaction with extract_tx_to_schedule_broadcast() and schedule |
Contributor
There was a problem hiding this comment.
This change makes me think the alternative design would be to return the Tx bytes with the state change as a Ok result of assume_... or check_broadcast_suitability... to compel it, but I do think that complicates the situation and is unnecessary after we have the forthcoming change to be able to extract later on thanks to SEL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per BIP-77:
However, the fallback transaction available at the
UncheckedProposaltypestate may not be "broadcastable". Only after transitioning toMaybeInputsOwnedviacheck_broadcast_suitabilitycan we determine with high confidence that the fallback is valid for broadcast.Related PR: #799