Fireable -> EventSwitch; rs in EventDataRoundState; fixes from review

This commit is contained in:
Ethan Buchman
2015-12-14 00:38:19 -05:00
parent 261647a012
commit b9e143d956
10 changed files with 127 additions and 166 deletions

View File

@ -324,7 +324,7 @@ func simpleConsensusState(nValidators int) (*ConsensusState, []*validatorStub) {
cs.SetPrivValidator(privVals[0])
evsw := events.NewEventSwitch()
cs.SetFireable(evsw)
cs.SetEventSwitch(evsw)
evsw.Start()
// start the transition routines
@ -340,7 +340,7 @@ func simpleConsensusState(nValidators int) (*ConsensusState, []*validatorStub) {
}
func subscribeToVoter(cs *ConsensusState, addr []byte) chan interface{} {
voteCh0 := cs.evsw.(*events.EventSwitch).SubscribeToEvent(types.EventStringVote(), 0)
voteCh0 := cs.evsw.SubscribeToEvent("tester", types.EventStringVote(), 0)
voteCh := make(chan interface{})
go func() {
for {