Remove PollingForProposal from session event#1128
Merged
spacebear21 merged 1 commit intopayjoin:masterfrom Oct 1, 2025
Merged
Conversation
arminsabouri
commented
Oct 1, 2025
| pub enum SessionEvent { | ||
| /// Sender was created with a HPKE key pair | ||
| CreatedReplyKey(WithReplyKey), | ||
| CreatedReplyKey(Box<WithReplyKey>), |
Collaborator
Author
There was a problem hiding this comment.
Note boxing WithReplyKey was to appeas clippy which was upset that this one variant was larger than the others.
error: large size difference between variants
--> payjoin/src/core/send/v2/session.rs:90:1
|
90 | / pub enum SessionEvent {
91 | | /// Sender was created with a HPKE key pair
92 | | CreatedReplyKey(WithReplyKey),
| | ----------------------------- the largest variant contains at least 584 bytes
93 | | /// Sender POST'd the original PSBT, and waiting to receive a Proposal PSBT using GET context
... |
96 | | ProposalReceived(bitcoin::Psbt),
| | ------------------------------- the second-largest variant contains at least 192 bytes
97 | | /// Invalid session
98 | | SessionInvalid(String),
99 | | }
| |_^ the entire enum is at least 584 bytes
|
Contributor
There was a problem hiding this comment.
As long as serialization works I don't have any problem with a box.
Contributor
There was a problem hiding this comment.
The only issue I could see here is if we're intending to support nostd, but then I think we'd have to remove boxes elsewhere anyway. I think it might be OK to leave that to v2, especially since I don't believe the serialization would change. Only the serializER would change.
Collaborator
Pull Request Test Coverage Report for Build 18168341786Details
💛 - Coveralls |
DanGould
reviewed
Oct 1, 2025
2 tasks
`PollingForProposal` can be re-derived from the previous typestate and is not primary information that is obtained from processing `WithReplyKey`.
70c968e to
f541577
Compare
DanGould
approved these changes
Oct 1, 2025
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.
PollingForProposalcan be re-derived from the previous typestate and is not primary information that is obtained from processingWithReplyKey.Related to #1119
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.