Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing test #2607

Merged

Conversation

milosevic
Copy link
Contributor

No description provided.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (2587-validate-block-time-height-1@8aedcd3). Click here to learn what that means.
The diff coverage is 100%.

@@                         Coverage Diff                          @@
##             2587-validate-block-time-height-1    #2607   +/-   ##
====================================================================
  Coverage                                     ?   61.41%           
====================================================================
  Files                                        ?      202           
  Lines                                        ?    16753           
  Branches                                     ?        0           
====================================================================
  Hits                                         ?    10289           
  Misses                                       ?     5593           
  Partials                                     ?      871
Impacted Files Coverage Δ
p2p/netaddress.go 72.39% <ø> (ø)
cmd/tendermint/commands/lite.go 17.5% <100%> (ø)

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍰 🌮 🍉

neat!

@melekes melekes merged commit 68a4a9d into 2587-validate-block-time-height-1 Oct 11, 2018
@melekes melekes deleted the zarko-2587-fix-failing-test branch October 11, 2018 14:51
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants