start/stop the book with reactor

Refs https://github.com/tendermint/tendermint/issues/335
This commit is contained in:
Anton Kalyaev
2017-03-04 22:40:48 -05:00
committed by Ethan Buchman
parent 17e6ae813f
commit 332f7056f7
+2
View File
@@ -42,12 +42,14 @@ func NewPEXReactor(book *AddrBook) *PEXReactor {
func (pexR *PEXReactor) OnStart() error {
pexR.BaseReactor.OnStart()
pexR.book.OnStart()
go pexR.ensurePeersRoutine()
return nil
}
func (pexR *PEXReactor) OnStop() {
pexR.BaseReactor.OnStop()
pexR.book.OnStop()
}
// Implements Reactor