libs/common: refactor libs common 3 (#4232)

* libs/common: refactor libs common 3

- move nil.go into types folder and make private
- move service & baseservice out of common into service pkg

ref #4147

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* add changelog entry
This commit is contained in:
Marko
2019-12-11 09:31:25 +01:00
committed by GitHub
parent efc27ab0b9
commit 27b00cf8d1
50 changed files with 163 additions and 150 deletions

View File

@@ -3,14 +3,14 @@ package proxy
import (
"github.com/pkg/errors"
cmn "github.com/tendermint/tendermint/libs/common"
"github.com/tendermint/tendermint/libs/service"
)
//-----------------------------
// Tendermint's interface to the application consists of multiple connections
type AppConns interface {
cmn.Service
service.Service
Mempool() AppConnMempool
Consensus() AppConnConsensus
@@ -28,7 +28,7 @@ func NewAppConns(clientCreator ClientCreator) AppConns {
// and manages their underlying abci clients
// TODO: on app restart, clients must reboot together
type multiAppConn struct {
cmn.BaseService
service.BaseService
mempoolConn *appConnMempool
consensusConn *appConnConsensus
@@ -42,7 +42,7 @@ func NewMultiAppConn(clientCreator ClientCreator) *multiAppConn {
multiAppConn := &multiAppConn{
clientCreator: clientCreator,
}
multiAppConn.BaseService = *cmn.NewBaseService(nil, "multiAppConn", multiAppConn)
multiAppConn.BaseService = *service.NewBaseService(nil, "multiAppConn", multiAppConn)
return multiAppConn
}