From 4fd1471f11ba814b0edb3a6a4e8debc2510edbe2 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 28 Mar 2017 12:09:11 -0400 Subject: [PATCH] remove BaseService.OnStart --- blockchain/pool.go | 2 -- consensus/replay_file.go | 2 -- consensus/state.go | 1 - consensus/ticker.go | 1 - consensus/wal.go | 1 - node/node.go | 1 - proxy/multi_app_conn.go | 1 - 7 files changed, 9 deletions(-) diff --git a/blockchain/pool.go b/blockchain/pool.go index ef673b342..32db956c1 100644 --- a/blockchain/pool.go +++ b/blockchain/pool.go @@ -63,7 +63,6 @@ func NewBlockPool(start int, requestsCh chan<- BlockRequest, timeoutsCh chan<- s } func (pool *BlockPool) OnStart() error { - pool.BaseService.OnStart() go pool.makeRequestersRoutine() pool.startTime = time.Now() return nil @@ -409,7 +408,6 @@ func newBPRequester(pool *BlockPool, height int) *bpRequester { } func (bpr *bpRequester) OnStart() error { - bpr.BaseService.OnStart() go bpr.requestRoutine() return nil } diff --git a/consensus/replay_file.go b/consensus/replay_file.go index 6ff380880..5ad1b9457 100644 --- a/consensus/replay_file.go +++ b/consensus/replay_file.go @@ -127,8 +127,6 @@ func (pb *playback) replayReset(count int, newStepCh chan interface{}) error { } func (cs *ConsensusState) startForReplay() { - // don't want to start full cs - cs.BaseService.OnStart() log.Warn("Replay commands are disabled until someone updates them and writes tests") /* TODO:! diff --git a/consensus/state.go b/consensus/state.go index d4c63a681..63616cbd3 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -340,7 +340,6 @@ func (cs *ConsensusState) LoadCommit(height int) *types.Commit { } func (cs *ConsensusState) OnStart() error { - cs.BaseService.OnStart() walFile := cs.config.GetString("cs_wal_file") if err := cs.OpenWAL(walFile); err != nil { diff --git a/consensus/ticker.go b/consensus/ticker.go index 06a8f7d20..b318597d3 100644 --- a/consensus/ticker.go +++ b/consensus/ticker.go @@ -45,7 +45,6 @@ func NewTimeoutTicker() TimeoutTicker { } func (t *timeoutTicker) OnStart() error { - t.BaseService.OnStart() go t.timeoutRoutine() diff --git a/consensus/wal.go b/consensus/wal.go index 99035ee2e..6d8eb3819 100644 --- a/consensus/wal.go +++ b/consensus/wal.go @@ -55,7 +55,6 @@ func NewWAL(walFile string, light bool) (*WAL, error) { } func (wal *WAL) OnStart() error { - wal.BaseService.OnStart() size, err := wal.group.Head.Size() if err != nil { return err diff --git a/node/node.go b/node/node.go index f9c69c289..6815c779b 100644 --- a/node/node.go +++ b/node/node.go @@ -194,7 +194,6 @@ func NewNode(config cfg.Config, privValidator *types.PrivValidator, clientCreato } func (n *Node) OnStart() error { - n.BaseService.OnStart() // Create & add listener protocol, address := ProtocolAndAddress(n.config.GetString("node_laddr")) diff --git a/proxy/multi_app_conn.go b/proxy/multi_app_conn.go index 353ade35c..81e01aa29 100644 --- a/proxy/multi_app_conn.go +++ b/proxy/multi_app_conn.go @@ -72,7 +72,6 @@ func (app *multiAppConn) Query() AppConnQuery { } func (app *multiAppConn) OnStart() error { - app.BaseService.OnStart() // query connection querycli, err := app.clientCreator.NewABCIClient()