From c0aea7a093aad946e896734c3f5c93036d41fb6f Mon Sep 17 00:00:00 2001 From: daeMOn Date: Fri, 30 Apr 2021 09:29:24 +0200 Subject: [PATCH] fix: flaky test reporting invalid header time (#250) * fix #241 : flaky test reporting invalid header time Backported from v0.34.10 fix at https://github.com/tendermint/tendermint/commit/4b99502d5b75d4d1a199f9b741f3be679ecc8cab --- .github/workflows/go.yml | 4 ---- config/toml.go | 18 ++++++++++++++++++ state/state_test.go | 1 + 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index deb00b9b3..54c3fe340 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,10 +7,6 @@ on: - release/* - collaborative-learning pull_request: - branches: - - master - - release/* - - collaborative-learning jobs: diff --git a/config/toml.go b/config/toml.go index 3fe4d1aac..4403bbf61 100644 --- a/config/toml.go +++ b/config/toml.go @@ -449,6 +449,24 @@ func ResetTestRootWithChainID(testName string, chainID string) *Config { var testGenesisFmt = `{ "genesis_time": "2018-10-10T08:20:13.695936996Z", "chain_id": "%s", + "consensus_params": { + "block": { + "max_bytes": "22020096", + "max_gas": "-1", + "time_iota_ms": "10" + }, + "evidence": { + "max_age_num_blocks": "100000", + "max_age_duration": "172800000000000", + "max_num": 50 + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + }, + "version": {} + }, "validators": [ { "pub_key": { diff --git a/state/state_test.go b/state/state_test.go index 746f7837c..e59dc66f2 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -939,6 +939,7 @@ func TestConsensusParamsChangesSaveLoad(t *testing.T) { for i := 1; i < N+1; i++ { params[i] = *types.DefaultConsensusParams() params[i].Block.MaxBytes += int64(i) + params[i].Block.TimeIotaMs = 10 } // Build the params history by running updateState