From bd353e004abd50d5e2a63b2ffc2ed12c0a78adf9 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Fri, 28 Oct 2016 12:03:21 -0700 Subject: [PATCH] QuitService->BaseService --- addrbook.go | 8 ++++---- switch.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addrbook.go b/addrbook.go index d2e4d48e6..2bbae64f5 100644 --- a/addrbook.go +++ b/addrbook.go @@ -75,7 +75,7 @@ const ( /* AddrBook - concurrency safe peer address manager */ type AddrBook struct { - QuitService + BaseService mtx sync.Mutex filePath string @@ -106,7 +106,7 @@ func NewAddrBook(filePath string, routabilityStrict bool) *AddrBook { routabilityStrict: routabilityStrict, } am.init() - am.QuitService = *NewQuitService(log, "AddrBook", am) + am.BaseService = *NewBaseService(log, "AddrBook", am) return am } @@ -126,7 +126,7 @@ func (a *AddrBook) init() { } func (a *AddrBook) OnStart() error { - a.QuitService.OnStart() + a.BaseService.OnStart() a.loadFromFile(a.filePath) a.wg.Add(1) go a.saveRoutine() @@ -134,7 +134,7 @@ func (a *AddrBook) OnStart() error { } func (a *AddrBook) OnStop() { - a.QuitService.OnStop() + a.BaseService.OnStop() a.wg.Wait() } diff --git a/switch.go b/switch.go index 61d269491..bbb73805e 100644 --- a/switch.go +++ b/switch.go @@ -26,13 +26,13 @@ type Reactor interface { //-------------------------------------- type BaseReactor struct { - QuitService // Provides Start, Stop, .Quit + BaseService // Provides Start, Stop, .Quit Switch *Switch } func NewBaseReactor(log log15.Logger, name string, impl Reactor) *BaseReactor { return &BaseReactor{ - QuitService: *NewQuitService(log, name, impl), + BaseService: *NewBaseService(log, name, impl), Switch: nil, } }