Skip to content

Fix failing test#2607

Merged
melekes merged 1 commit into2587-validate-block-time-height-1from
zarko-2587-fix-failing-test
Oct 11, 2018
Merged

Fix failing test#2607
melekes merged 1 commit into2587-validate-block-time-height-1from
zarko-2587-fix-failing-test

Conversation

@milosevic
Copy link
Contributor

No description provided.

@milosevic milosevic force-pushed the zarko-2587-fix-failing-test branch from f71aa5f to 8425e06 Compare October 11, 2018 13:24
@milosevic milosevic force-pushed the zarko-2587-fix-failing-test branch from 8425e06 to 78755bd Compare October 11, 2018 13:25
@milosevic milosevic removed request for ebuchman and xla October 11, 2018 13:26
@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.

3 participants