consensus: TimeoutTicker, skip TimeoutCommit on HasAll

This commit is contained in:
Ethan Buchman
2016-12-19 10:44:25 -05:00
parent 18b3821e06
commit faf23aa0d4
5 changed files with 122 additions and 23 deletions

View File

@ -24,7 +24,7 @@ func init() {
// Ensure a testnet makes blocks
func TestReactor(t *testing.T) {
N := 4
css := randConsensusNet(N, "consensus_reactor_test", crankTimeoutPropose)
css := randConsensusNet(N, "consensus_reactor_test", crankTimeoutPropose, newMockTickerFunc(true))
reactors := make([]*ConsensusReactor, N)
eventChans := make([]chan interface{}, N)
for i := 0; i < N; i++ {
@ -58,7 +58,7 @@ func TestReactor(t *testing.T) {
func TestValidatorSetChanges(t *testing.T) {
nPeers := 8
nVals := 4
css := randConsensusNetWithPeers(nVals, nPeers, "consensus_val_set_changes_test", crankTimeoutPropose)
css := randConsensusNetWithPeers(nVals, nPeers, "consensus_val_set_changes_test", crankTimeoutPropose, newMockTickerFunc(true))
reactors := make([]*ConsensusReactor, nPeers)
eventChans := make([]chan interface{}, nPeers)
for i := 0; i < nPeers; i++ {