Fix failing test#2607
Merged
melekes merged 1 commit into2587-validate-block-time-height-1from Oct 11, 2018
Merged
Conversation
f71aa5f to
8425e06
Compare
8425e06 to
78755bd
Compare
Codecov Report
@@ Coverage Diff @@
## 2587-validate-block-time-height-1 #2607 +/- ##
====================================================================
Coverage ? 61.41%
====================================================================
Files ? 202
Lines ? 16753
Branches ? 0
====================================================================
Hits ? 10289
Misses ? 5593
Partials ? 871
|
4 tasks
ebuchman
pushed a commit
that referenced
this pull request
Oct 12, 2018
* require block.Time of the fist block to be genesis time Refs #2587: ``` We only start validating block.Time when Height > 1, because there is no commit to compute the median timestamp from for the first block. This means a faulty proposer could make the first block with whatever time they want. Instead, we should require the timestamp of block 1 to match the genesis time. I discovered this while refactoring the ValidateBlock tests to be table-driven while working on tests for #2560. ``` * do not accept blocks with negative height * update changelog and spec * nanos precision for test genesis time * Fix failing test (#2607)
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.
No description provided.