remove or comment out unused code

This commit is contained in:
Anton Kaliaev
2019-02-06 15:16:38 +04:00
parent da33dd04cc
commit ffd3bf8448
10 changed files with 163 additions and 185 deletions

View File

@ -378,35 +378,35 @@ func ensureNewEvent(
}
}
func ensureNewRoundStep(stepCh <-chan interface{}, height int64, round int) {
ensureNewEvent(
stepCh,
height,
round,
ensureTimeout,
"Timeout expired while waiting for NewStep event")
}
// func ensureNewRoundStep(stepCh <-chan interface{}, height int64, round int) {
// ensureNewEvent(
// stepCh,
// height,
// round,
// ensureTimeout,
// "Timeout expired while waiting for NewStep event")
// }
func ensureNewVote(voteCh <-chan interface{}, height int64, round int) {
select {
case <-time.After(ensureTimeout):
break
case v := <-voteCh:
edv, ok := v.(types.EventDataVote)
if !ok {
panic(fmt.Sprintf("expected a *types.Vote, "+
"got %v. wrong subscription channel?",
reflect.TypeOf(v)))
}
vote := edv.Vote
if vote.Height != height {
panic(fmt.Sprintf("expected height %v, got %v", height, vote.Height))
}
if vote.Round != round {
panic(fmt.Sprintf("expected round %v, got %v", round, vote.Round))
}
}
}
// func ensureNewVote(voteCh <-chan interface{}, height int64, round int) {
// select {
// case <-time.After(ensureTimeout):
// break
// case v := <-voteCh:
// edv, ok := v.(types.EventDataVote)
// if !ok {
// panic(fmt.Sprintf("expected a *types.Vote, "+
// "got %v. wrong subscription channel?",
// reflect.TypeOf(v)))
// }
// vote := edv.Vote
// if vote.Height != height {
// panic(fmt.Sprintf("expected height %v, got %v", height, vote.Height))
// }
// if vote.Round != round {
// panic(fmt.Sprintf("expected round %v, got %v", round, vote.Round))
// }
// }
// }
func ensureNewRound(roundCh <-chan interface{}, height int64, round int) {
select {