This commit is contained in:
Anca Zamfir
2021-12-21 20:34:25 +01:00
parent 6b8cf31510
commit 9adbd50808
3 changed files with 3 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ const (
testSubscriber = "test-client"
// genesis, chain_id, priv_val
ensureTimeout = 200 * time.Millisecond
ensureTimeout = time.Millisecond * 200
)
// A cleanupFunc cleans up any config / test files created for a particular

View File

@@ -335,7 +335,7 @@ func TestProposerWaitsForGenesisTime(t *testing.T) {
cfg := pbtsTestConfiguration{
timingParams: types.TimingParams{
Precision: 10 * time.Millisecond,
MessageDelay: 100 * time.Millisecond,
MessageDelay: 10 * time.Millisecond,
},
timeoutPropose: 10 * time.Millisecond,
genesisTime: initialTime,

View File

@@ -1317,10 +1317,7 @@ func (cs *State) proposalIsTimely(proposal *types.Proposal) bool {
MessageDelay: cs.state.ConsensusParams.Timing.MessageDelay,
}
if !proposal.IsTimely(tmtime.DefaultSource{}, tp, cs.state.InitialHeight) {
return false
}
return true
return proposal.IsTimely(tmtime.DefaultSource{}, tp, cs.state.InitialHeight)
}
func (cs *State) defaultDoPrevote(height int64, round int32) {