cleanup weird edge_bits handling in tests#3316
Merged
antiochp merged 1 commit intoMay 4, 2020
Merged
Conversation
antiochp
commented
May 3, 2020
| edge_bits, | ||
| ) | ||
| .unwrap(); | ||
| b.header.pow.proof.edge_bits = edge_bits; |
Member
Author
There was a problem hiding this comment.
This is redundant as we already set this earlier.
antiochp
commented
May 3, 2020
|
|
||
| chain.set_txhashset_roots(&mut b).unwrap(); | ||
|
|
||
| let edge_bits = if n == 2 { |
Member
Author
There was a problem hiding this comment.
n here is block height and not sure why we would need special handling for height 2.
In fact this is actually a relative height as we may run this code multiple times in a test (n is how many additional blocks to mine).
hashmap
approved these changes
May 4, 2020
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Looks like some legacy refactoring left some conditional stuff in place that no longer makes any sense.
This PR simply cleans this up. All chain tests still pass.