start/stop the book with reactor
Refs https://github.com/tendermint/tendermint/issues/335
This commit is contained in:
parent
17e6ae813f
commit
332f7056f7
|
@ -42,12 +42,14 @@ func NewPEXReactor(book *AddrBook) *PEXReactor {
|
||||||
|
|
||||||
func (pexR *PEXReactor) OnStart() error {
|
func (pexR *PEXReactor) OnStart() error {
|
||||||
pexR.BaseReactor.OnStart()
|
pexR.BaseReactor.OnStart()
|
||||||
|
pexR.book.OnStart()
|
||||||
go pexR.ensurePeersRoutine()
|
go pexR.ensurePeersRoutine()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pexR *PEXReactor) OnStop() {
|
func (pexR *PEXReactor) OnStop() {
|
||||||
pexR.BaseReactor.OnStop()
|
pexR.BaseReactor.OnStop()
|
||||||
|
pexR.book.OnStop()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implements Reactor
|
// Implements Reactor
|
||||||
|
|
Loading…
Reference in New Issue