mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 22:44:24 +00:00
Simplify Service/Reactor pattern
This commit is contained in:
+4
-2
@@ -31,12 +31,14 @@ func NewEventSwitch() *EventSwitch {
|
||||
return evsw
|
||||
}
|
||||
|
||||
func (evsw *EventSwitch) AfterStart() {
|
||||
func (evsw *EventSwitch) OnStart() {
|
||||
evsw.BaseService.OnStart()
|
||||
evsw.eventCells = make(map[string]*eventCell)
|
||||
evsw.listeners = make(map[string]*eventListener)
|
||||
}
|
||||
|
||||
func (evsw *EventSwitch) AfterStop() {
|
||||
func (evsw *EventSwitch) OnStop() {
|
||||
evsw.BaseService.OnStop()
|
||||
evsw.eventCells = nil
|
||||
evsw.listeners = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user