-
Notifications
You must be signed in to change notification settings - Fork 78
Separate receiver::{v1,v2} abstraction cleanly #998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
1d1e378
Move FinalizeProposalError to error mod
DanGould 34e6ab1
Move v1-exclusive code to appropriate module
DanGould 3a1fa44
Move receive::v1 to receive::common
DanGould 9ac5afc
Move receive::common::exclusive to receive::common::v1
DanGould 993258a
Move receive::common test fn to receive module
DanGould ff70bef
Remove unnecessary PayjoinProposal field
DanGould 68987d0
Simplify visibility of core receive structs
DanGould 66302af
Abstract v1-exclusive ProvisionalProposal onward
DanGould 430db08
Use v2 logic in v2 tests
DanGould f619017
Make receive::common::v1::test private
DanGould 4e307d8
Move receive::common::v1 to receive::v1
DanGould aa5fa74
Refactor WantsOutputs::from_proposal to ::new
DanGould f6a835a
Move WantsOutputs::new to the top of impl
DanGould efdd88b
Move interleave_shuffle to reduce visibility
DanGould 9aa635a
Move test_pjos_disabled to common
DanGould 51b31d1
Move test_avoid_uih_one_output to WantsOutputs containing mod
DanGould 668377a
Move empty_candidate_inputs to common
DanGould 19b2491
Add test_multiple_contribute_inputs() to common
DanGould 6d75a4b
Move rest of tests into common
DanGould 91b5316
Move tests to reduce common struct/field/fn scopes
DanGould eac5e77
Reduce PsbtContext method visibility
DanGould de883a6
Make .save(&persister).unwrap()s .expect()s
DanGould File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
receive::v2::SessionEvent::ProvisionalProposal(PsbtContext)requires this visibility. It's possible to wrap this struct if desired, but PsbtContext is the actual event diff that we're using. Perhaps it could be pruned further, just to the bitcoin::Psbt that's the payjoin_psbt since we already have the original psbt at the UncheckedProposal stage.IMO UncheckedProposal((Original, Optioncrate::HpkePublicKey)) deserves its own type as well instead of a tuple but that can come after. The
UncheckedProposaltuple should probably at least be deconstructed out of the nested tuple toUncheckedProposal(Original, Option<crate::HpkePublicKey>)