|
@ -42,14 +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() |
|
|
|
|
|
|
|
|
pexR.book.Start() |
|
|
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() |
|
|
|
|
|
|
|
|
pexR.book.Stop() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Implements Reactor
|
|
|
// Implements Reactor
|
|
|