Browse Source

start/stop the book with reactor

Refs https://github.com/tendermint/tendermint/issues/335
pull/456/head
Anton Kalyaev 8 years ago
committed by Ethan Buchman
parent
commit
332f7056f7
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      pex_reactor.go

+ 2
- 0
pex_reactor.go View File

@ -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…
Cancel
Save