This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Conversation
This file contains 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
rphmeier
added
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
A1-needsburnin
D5-nicetohaveaudit ⚠️
PR contains trivial changes to logic that should be properly reviewed.
labels
Nov 29, 2021
bkchr
approved these changes
Nov 29, 2021
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.
A test would be nice, but otherwise looks good.
node/core/approval-voting/src/lib.rs
Outdated
Comment on lines
535
to
537
if !entry.get().contains(&relay_block) { | ||
entry.get_mut().push(relay_block); | ||
} |
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.
If we would directly use a HashSet
, we would only require a insert
.
node/core/approval-voting/src/lib.rs
Outdated
}, | ||
Entry::Vacant(mut entry) => { | ||
// validation not ongoing. launch work and time out the remote handle. | ||
let _ = entry.insert(vec![relay_block]); |
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.
Suggested change
let _ = entry.insert(vec![relay_block]); | |
entry.insert(vec![relay_block]); |
Is not required.
@Lldenaurois can you add tests?
|
drahnr
approved these changes
Nov 30, 2021
…ggered once for each Candidate Hash
slumber
reviewed
Dec 14, 2021
Lldenaurois
force-pushed
the
rh-currently-checking-cache
branch
from
December 14, 2021 19:29
4939be0
to
d04b1b3
Compare
slumber
approved these changes
Dec 15, 2021
drahnr
pushed a commit
that referenced
this pull request
Jan 4, 2022
* alter currently-checking-set to launch work only on new candidates * fmt * fix compilation * address review * Introduce approvals cache test that ensures approval work is only triggered once for each Candidate Hash * Fix formatting * Address Feedback * Move final message await into handle function Co-authored-by: Chris Sosnin <[email protected]> Co-authored-by: Lldenaurois <[email protected]>
Wizdave97
pushed a commit
to ComposableFi/polkadot
that referenced
this pull request
Feb 3, 2022
* alter currently-checking-set to launch work only on new candidates * fmt * fix compilation * address review * Introduce approvals cache test that ensures approval work is only triggered once for each Candidate Hash * Fix formatting * Address Feedback * Move final message await into handle function Co-authored-by: Chris Sosnin <[email protected]> Co-authored-by: Lldenaurois <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D5-nicetohaveaudit ⚠️
PR contains trivial changes to logic that should be properly reviewed.
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.
We were spawning validation work in approval-voting for every
(candidate, relay-parent)
combination. Since candidate validation is the same regardless of relay-parent of inclusion, the intent of this code was to spawn work only once per candidate. I have fixed the code to do exactly that.