mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 22:05:18 +00:00
remove or comment out unused code
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -22,10 +22,6 @@ func init() {
|
||||
config = ResetConfig("consensus_state_test")
|
||||
}
|
||||
|
||||
func ensureProposeTimeout(timeoutPropose time.Duration) time.Duration {
|
||||
return time.Duration(timeoutPropose.Nanoseconds()*2) * time.Nanosecond
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
ProposeSuite
|
||||
|
||||
Reference in New Issue
Block a user