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

@@ -11,6 +11,7 @@ import (
"github.com/tendermint/tendermint/crypto/merkle"
cmn "github.com/tendermint/tendermint/libs/common"
service "github.com/tendermint/tendermint/libs/service"
lite "github.com/tendermint/tendermint/lite2"
rpcclient "github.com/tendermint/tendermint/rpc/client"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
@@ -21,7 +22,7 @@ import (
// Client is an RPC client, which uses lite#Client to verify data (if it can be
// proved!).
type Client struct {
cmn.BaseService
service.BaseService
next rpcclient.Client
lc *lite.Client
@@ -37,7 +38,7 @@ func NewClient(next rpcclient.Client, lc *lite.Client) *Client {
lc: lc,
prt: defaultProofRuntime(),
}
c.BaseService = *cmn.NewBaseService(nil, "Client", c)
c.BaseService = *service.NewBaseService(nil, "Client", c)
return c
}