This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Conversation
bkchr
approved these changes
Nov 29, 2021
Member
bkchr
left a comment
There was a problem hiding this comment.
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); | ||
| } |
Member
There was a problem hiding this comment.
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]); |
Member
There was a problem hiding this comment.
Suggested change
| let _ = entry.insert(vec![relay_block]); | |
| entry.insert(vec![relay_block]); |
Is not required.
Contributor
Author
|
@Lldenaurois can you add tests?
|
drahnr
approved these changes
Nov 30, 2021
…ggered once for each Candidate Hash
slumber
reviewed
Dec 14, 2021
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 <chris125_@live.com> Co-authored-by: Lldenaurois <Ljdenaurois@gmail.com>
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 <chris125_@live.com> Co-authored-by: Lldenaurois <Ljdenaurois@gmail.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.