mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
common -> cmn
This commit is contained in:
@ -7,13 +7,13 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/tendermint/abci/types"
|
||||
common "github.com/tendermint/go-common"
|
||||
cmn "github.com/tendermint/go-common"
|
||||
)
|
||||
|
||||
// var maxNumberConnections = 2
|
||||
|
||||
type GRPCServer struct {
|
||||
common.BaseService
|
||||
cmn.BaseService
|
||||
|
||||
proto string
|
||||
addr string
|
||||
@ -23,7 +23,7 @@ type GRPCServer struct {
|
||||
app types.ABCIApplicationServer
|
||||
}
|
||||
|
||||
func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) (common.Service, error) {
|
||||
func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) (cmn.Service, error) {
|
||||
parts := strings.SplitN(protoAddr, "://", 2)
|
||||
proto, addr := parts[0], parts[1]
|
||||
s := &GRPCServer{
|
||||
@ -32,7 +32,7 @@ func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) (common.Se
|
||||
listener: nil,
|
||||
app: app,
|
||||
}
|
||||
s.BaseService = *common.NewBaseService(nil, "ABCIServer", s)
|
||||
s.BaseService = *cmn.NewBaseService(nil, "ABCIServer", s)
|
||||
_, err := s.Start() // Just start it
|
||||
return s, err
|
||||
}
|
||||
|
@ -4,11 +4,11 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/tendermint/abci/types"
|
||||
common "github.com/tendermint/go-common"
|
||||
cmn "github.com/tendermint/go-common"
|
||||
)
|
||||
|
||||
func NewServer(protoAddr, transport string, app types.Application) (common.Service, error) {
|
||||
var s common.Service
|
||||
func NewServer(protoAddr, transport string, app types.Application) (cmn.Service, error) {
|
||||
var s cmn.Service
|
||||
var err error
|
||||
switch transport {
|
||||
case "socket":
|
||||
|
@ -9,13 +9,13 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/tendermint/abci/types"
|
||||
common "github.com/tendermint/go-common"
|
||||
cmn "github.com/tendermint/go-common"
|
||||
)
|
||||
|
||||
// var maxNumberConnections = 2
|
||||
|
||||
type SocketServer struct {
|
||||
common.BaseService
|
||||
cmn.BaseService
|
||||
|
||||
proto string
|
||||
addr string
|
||||
@ -29,7 +29,7 @@ type SocketServer struct {
|
||||
app types.Application
|
||||
}
|
||||
|
||||
func NewSocketServer(protoAddr string, app types.Application) (common.Service, error) {
|
||||
func NewSocketServer(protoAddr string, app types.Application) (cmn.Service, error) {
|
||||
parts := strings.SplitN(protoAddr, "://", 2)
|
||||
proto, addr := parts[0], parts[1]
|
||||
s := &SocketServer{
|
||||
@ -39,7 +39,7 @@ func NewSocketServer(protoAddr string, app types.Application) (common.Service, e
|
||||
app: app,
|
||||
conns: make(map[int]net.Conn),
|
||||
}
|
||||
s.BaseService = *common.NewBaseService(nil, "ABCIServer", s)
|
||||
s.BaseService = *cmn.NewBaseService(nil, "ABCIServer", s)
|
||||
_, err := s.Start() // Just start it
|
||||
return s, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user