consensus: fix startnextheightcorrectly test (#4938)

This commit is contained in:
Callum Waters
2020-06-02 22:46:03 +02:00
committed by GitHub
parent 8ab0a4c3b0
commit e538ea03d1
2 changed files with 20 additions and 5 deletions

View File

@@ -625,6 +625,14 @@ func ensureVote(voteCh <-chan tmpubsub.Message, height int64, round int,
}
}
func ensurePrecommitTimeout(ch <-chan tmpubsub.Message) {
select {
case <-time.After(ensureTimeout):
panic("Timeout expired while waiting for the Precommit to Timeout")
case <-ch:
}
}
func ensureNewEventOnChannel(ch <-chan tmpubsub.Message) {
select {
case <-time.After(ensureTimeout):