timeoutRoutine

This commit is contained in:
Ethan Buchman
2015-12-08 16:00:59 -05:00
parent 2c595284d8
commit 4b6e992a47
3 changed files with 212 additions and 96 deletions

View File

@ -297,6 +297,13 @@ func simpleConsensusState(nValidators int) (*ConsensusState, []*validatorStub) {
// read off the NewHeightStep
<-cs.NewStepCh()
// start the reactor routines
// (we should move these to state but the receive routine needs to be able to "broadcast votes"
// --> add good votes to some buffered chan and have a go routine do the broadcast ...
conR := NewConsensusReactor(cs, nil, false)
go conR.receiveRoutine() // serializes processing of proposoals, block parts, votes
go conR.timeoutRoutine() // fires timeouts into the receive routine
for i := 0; i < nValidators; i++ {
vss[i] = NewValidatorStub(privVals[i])
}