This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Conversation
1babd75 to
4b6f6d3
Compare
rphmeier
reviewed
Jun 15, 2021
| vec![0, 3], // zero start with gap | ||
| vec![2], // non-zero start | ||
| vec![2, 4], // non-zero start with gap | ||
| ]; |
Contributor
There was a problem hiding this comment.
Some test cases with longer gaps and longer sequential runs would be good
Contributor
Author
There was a problem hiding this comment.
Yes, the goal here was to get started with something and see whether it's moving in the right direction. I will continue to expand on this.
In the subsequent commit, we will begin to test this method in isolation.
Previously, this algorithm would generate duplicate, empty entries for tranches (1..pre_end). This is caused because the initial value (0) for gap_end is treated as the end of a prior tranche that wasn't actually processed. The first pass thus would add (1..tranche) empty entries, in addition to the (0..pre_end) empty entries chained at the end of the method. This is fixed by using the current tranche as the gap_start for the first iteration, ensuring that the approval_entries_filled only produces entries in the range (pre_end..post_start).
4b6f6d3 to
8dcdfc9
Compare
Contributor
|
Let's get the bugfix merged in this PR and then you can continue adding tests in a further branch |
rphmeier
reviewed
Jun 15, 2021
| vec![0, 3], // zero start with gap | ||
| vec![2], // non-zero start | ||
| vec![2, 4], // non-zero start with gap | ||
| ]; |
Contributor
There was a problem hiding this comment.
Suggested change
| ]; | |
| vec![0, 1, 2], // zero start with run and no gap | |
| vec![2, 3, 4, 8], // non-zero start with run and gap | |
| vec![0, 1, 2, 5, 6, 7], // zero start with runs and gap | |
| ]; |
Contributor
Author
|
Should be ready to go. I've opened a new PR with additional tests. I'll build on top of that one to expand on the testing for this subsystem. |
Contributor
|
This needs a merge with master and then should be good to go. |
rphmeier
approved these changes
Jun 16, 2021
Contributor
|
bot merge |
|
Waiting for commit status. |
ordian
added a commit
that referenced
this pull request
Jun 17, 2021
* master: Companion #9019 (max rpc payload override) (#3276) Implementers' Guide: Chain Selection (#3262) CLI: Add missing feature checking and check if someone passes a file (#3283) Export 'TakeRevenue' trait. (#3278) Add XCM Decode Limit (#3273) Allow Council to Use Scheduler (#3237) fix xcm pallet origin (#3272) extract determine_new_blocks into a separate utility (#3261) Approval checking unit tests (#3252) bridges: update finality-grandpa to 0.14.1 (#3266) malus - mockable overseer mvp (#3224) use safe math (#3249) Companion for #8920 (Control Staking) (#3260) Companion for #8949 (#3216)
This pull request was closed.
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.
This PR intends to add unit tests for approval checking in the Approval Voting subsystem