package consensus import ( "github.com/tendermint/tendermint/types" ) // NOTE: this is blocking func subscribeToEvent(evsw types.EventSwitch, receiver, eventID string, chanCap int) chan interface{} { // listen for new round ch := make(chan interface{}, chanCap) types.AddListenerForEvent(evsw, receiver, eventID, func(data types.TMEventData) { ch <- data }) return ch }