tests: fix consensus progress test fail

This commit is contained in:
Miya Chen 2017-08-28 11:05:04 +08:00
parent 80e29f5e37
commit 9bc3941d4d
1 changed files with 4 additions and 1 deletions

View File

@ -75,7 +75,10 @@ var _ = Describe("TFS-01: General consensus", func() {
go func(geth container.Ethereum) {
c := geth.NewClient()
lastBlockTime := int64(0)
for i := 1; i <= targetBlockHeight; i++ {
// The reason to verify block period from block#2 is that
// the block period from block#1 to block#2 might take long time due to
// encounter several round changes at the beginning of the consensus progress.
for i := 2; i <= targetBlockHeight; i++ {
header, err := c.HeaderByNumber(context.Background(), big.NewInt(int64(i)))
if err != nil {
errc <- err