This repository was archived by the owner on Nov 15, 2023. It is now read-only.
babe: Disable unused median calculation#3251
Merged
andresilva merged 4 commits intomasterfrom Jul 30, 2019
Merged
Conversation
Contributor
Author
|
I have also removed annoying forbid/deny clauses. |
64c21f3 to
84f9f50
Compare
5082ded to
0947a5b
Compare
Contributor
Author
|
Reverted removal of forbid/deny clauses to avoid conflicting with #3213. |
rphmeier
approved these changes
Jul 30, 2019
bkchr
approved these changes
Jul 30, 2019
| @@ -19,7 +19,6 @@ | |||
| //! BABE (Blind Assignment for Blockchain Extension) consensus in Substrate. | |||
|
|
|||
| #![forbid(unsafe_code, missing_docs, unused_must_use, unused_imports, unused_variables)] | |||
Member
There was a problem hiding this comment.
Suggested change
| #![forbid(unsafe_code, missing_docs, unused_must_use, unused_imports, unused_variables)] | |
| #![forbid(unsafe_code, missing_docs)] |
Contributor
Author
There was a problem hiding this comment.
Originally I removed all forbid/deny but since Gav did the same in #3213 I reverted to avoid conflicts. The only thing I removed was forbid(dead_code) which was necessary to make this PR compile.
Demi-Marie
approved these changes
Jul 30, 2019
Contributor
Demi-Marie
left a comment
There was a problem hiding this comment.
This looks good, although I would like to know what was wrong with the median algorithm.
Contributor
Author
|
@demimarie-parity a180365 (see #3248 as well). |
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.
The median calculation that is done to figure out at what time the current slot should start (i.e. offset) is currently not properly implemented. Since it is currently unused I have removed the call from verify to it to avoid any issues. I have also fixed an issue that caused it to panic.
Fixes #3248.