-
Notifications
You must be signed in to change notification settings - Fork 40
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
candidates_pending_availability added #2253
candidates_pending_availability added #2253
Conversation
* @when candidates_pending_availability() is invoked | ||
* @then successful result is returned | ||
*/ | ||
TEST_F(ParachainHostTest, DISABLED_CandidatesPendingAvailabilityTest) { |
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.
Why is it disabled?
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.
Every test in this file is disabled
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.
But why?
block, | ||
"ParachainHost_candidates_pending_availability", | ||
id)); | ||
return *ref; |
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.
Is the copy eliminated here/how large can this vector be? Maybe construct an outcome::result and move the vector there explicitly to avoid copying, if it can be large?
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.
Added explicit moving
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.
return std::move is typically a worse alternative, I mean construct a variable with type exactly matching the result type and move in its constructor, this practically guarantees RVO.
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.
I think move constructor for return value is guaranteed by this move. outcome::result<std::vector<std::optional>> res = std::move(*ref) is literally what's gonna happen. Anyway the vector will be moved efficiently.
…n-candidates_pending_availability
…n-candidates_pending_availability
…n-candidates_pending_availability
Referenced issues
Description of the Change
Possible Drawbacks
Checklist Before Opening a PR
Before you open a Pull Request (PR), please make sure you've completed the following steps and confirm by answering 'Yes' to each item: