Merge remote-tracking branch 'origin/replay'

This commit is contained in:
Jae Kwon
2016-01-28 19:53:22 -08:00
15 changed files with 866 additions and 146 deletions

15
consensus/common.go Normal file
View File

@ -0,0 +1,15 @@
package consensus
import (
"github.com/tendermint/go-events"
)
// NOTE: this is blocking
func subscribeToEvent(evsw *events.EventSwitch, receiver, eventID string, chanCap int) chan interface{} {
// listen for new round
ch := make(chan interface{}, chanCap)
evsw.AddListenerForEvent(receiver, eventID, func(data events.EventData) {
ch <- data
})
return ch
}