diff --git a/benchmarks/simu/counter.go b/benchmarks/simu/counter.go index 9a6db3f4c..f384d3579 100644 --- a/benchmarks/simu/counter.go +++ b/benchmarks/simu/counter.go @@ -8,8 +8,8 @@ import ( "github.com/gorilla/websocket" . "github.com/tendermint/tmlibs/common" - "github.com/tendermint/go-rpc/client" - "github.com/tendermint/go-rpc/types" + "github.com/tendermint/tendermint/rpc/client" + "github.com/tendermint/tendermint/rpc/types" "github.com/tendermint/go-wire" _ "github.com/tendermint/tendermint/rpc/tendermint/core/types" // Register RPCResponse > Result types ) diff --git a/glide.lock b/glide.lock index 42a261c10..c7c4649e9 100644 --- a/glide.lock +++ b/glide.lock @@ -108,7 +108,7 @@ imports: version: b5f314ffed65c81bd019ba1dd2bae0e95f3937f3 subpackages: - upnp -- name: github.com/tendermint/go-rpc +- name: github.com/tendermint/tendermint/rpc version: 2c8df0ee6b60d8ac33662df13a4e358c679e02bf subpackages: - client diff --git a/glide.yaml b/glide.yaml index b7d8de242..a1013eb90 100644 --- a/glide.yaml +++ b/glide.yaml @@ -22,7 +22,7 @@ import: version: develop - package: github.com/tendermint/go-p2p version: unstable -- package: github.com/tendermint/go-rpc +- package: github.com/tendermint/tendermint/rpc version: develop - package: github.com/tendermint/go-wire version: develop diff --git a/node/node.go b/node/node.go index e63e0db3e..e912495f2 100644 --- a/node/node.go +++ b/node/node.go @@ -13,8 +13,8 @@ import ( crypto "github.com/tendermint/go-crypto" dbm "github.com/tendermint/tmlibs/db" p2p "github.com/tendermint/go-p2p" - rpc "github.com/tendermint/go-rpc" - rpcserver "github.com/tendermint/go-rpc/server" + rpc "github.com/tendermint/tendermint/rpc" + rpcserver "github.com/tendermint/tendermint/rpc/server" wire "github.com/tendermint/go-wire" bc "github.com/tendermint/tendermint/blockchain" "github.com/tendermint/tendermint/consensus" diff --git a/rpc/Dockerfile b/rpc/Dockerfile index c23c911ce..c22412672 100644 --- a/rpc/Dockerfile +++ b/rpc/Dockerfile @@ -1,12 +1,12 @@ FROM golang:latest -RUN mkdir -p /go/src/github.com/tendermint/go-rpc -WORKDIR /go/src/github.com/tendermint/go-rpc +RUN mkdir -p /go/src/github.com/tendermint/tendermint/rpc +WORKDIR /go/src/github.com/tendermint/tendermint/rpc -COPY Makefile /go/src/github.com/tendermint/go-rpc/ -# COPY glide.yaml /go/src/github.com/tendermint/go-rpc/ -# COPY glide.lock /go/src/github.com/tendermint/go-rpc/ +COPY Makefile /go/src/github.com/tendermint/tendermint/rpc/ +# COPY glide.yaml /go/src/github.com/tendermint/tendermint/rpc/ +# COPY glide.lock /go/src/github.com/tendermint/tendermint/rpc/ -COPY . /go/src/github.com/tendermint/go-rpc +COPY . /go/src/github.com/tendermint/tendermint/rpc RUN make get_deps diff --git a/rpc/README.md b/rpc/README.md index 79dd9692e..f1ef7485a 100644 --- a/rpc/README.md +++ b/rpc/README.md @@ -1,6 +1,6 @@ -# go-rpc +# tendermint/rpc -[![CircleCI](https://circleci.com/gh/tendermint/go-rpc.svg?style=svg)](https://circleci.com/gh/tendermint/go-rpc) +[![CircleCI](https://circleci.com/gh/tendermint/tendermint/rpc.svg?style=svg)](https://circleci.com/gh/tendermint/tendermint/rpc) HTTP RPC server supporting calls via uri params, jsonrpc, and jsonrpc over websockets diff --git a/rpc/client/http_client.go b/rpc/client/http_client.go index f4a2a6d7e..ce78da43d 100644 --- a/rpc/client/http_client.go +++ b/rpc/client/http_client.go @@ -12,7 +12,7 @@ import ( "strings" "github.com/pkg/errors" - types "github.com/tendermint/go-rpc/types" + types "github.com/tendermint/tendermint/rpc/types" wire "github.com/tendermint/go-wire" ) @@ -27,7 +27,7 @@ func makeHTTPDialer(remoteAddr string) (string, func(string, string) (net.Conn, parts := strings.SplitN(remoteAddr, "://", 2) var protocol, address string if len(parts) != 2 { - log.Warn("WARNING (go-rpc): Please use fully formed listening addresses, including the tcp:// or unix:// prefix") + log.Warn("WARNING (tendermint/rpc): Please use fully formed listening addresses, including the tcp:// or unix:// prefix") protocol = types.SocketType(remoteAddr) address = remoteAddr } else { diff --git a/rpc/client/ws_client.go b/rpc/client/ws_client.go index b83d62974..70522265f 100644 --- a/rpc/client/ws_client.go +++ b/rpc/client/ws_client.go @@ -9,7 +9,7 @@ import ( "github.com/gorilla/websocket" "github.com/pkg/errors" cmn "github.com/tendermint/tmlibs/common" - types "github.com/tendermint/go-rpc/types" + types "github.com/tendermint/tendermint/rpc/types" wire "github.com/tendermint/go-wire" ) diff --git a/rpc/rpc_test.go b/rpc/rpc_test.go index ed28cbc8d..82940fc32 100644 --- a/rpc/rpc_test.go +++ b/rpc/rpc_test.go @@ -12,9 +12,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - client "github.com/tendermint/go-rpc/client" - server "github.com/tendermint/go-rpc/server" - types "github.com/tendermint/go-rpc/types" + client "github.com/tendermint/tendermint/rpc/client" + server "github.com/tendermint/tendermint/rpc/server" + types "github.com/tendermint/tendermint/rpc/types" wire "github.com/tendermint/go-wire" ) @@ -22,8 +22,8 @@ import ( const ( tcpAddr = "tcp://0.0.0.0:46657" - unixSocket = "/tmp/go-rpc.sock" - unixAddr = "unix:///tmp/go-rpc.sock" + unixSocket = "/tmp/tendermint/rpc.sock" + unixAddr = "unix:///tmp/tendermint/rpc.sock" websocketEndpoint = "/websocket/endpoint" ) diff --git a/rpc/server/handlers.go b/rpc/server/handlers.go index 456b4aaf5..f5b3659d3 100644 --- a/rpc/server/handlers.go +++ b/rpc/server/handlers.go @@ -14,7 +14,7 @@ import ( "github.com/gorilla/websocket" "github.com/pkg/errors" - types "github.com/tendermint/go-rpc/types" + types "github.com/tendermint/tendermint/rpc/types" wire "github.com/tendermint/go-wire" cmn "github.com/tendermint/tmlibs/common" events "github.com/tendermint/tmlibs/events" diff --git a/rpc/server/http_server.go b/rpc/server/http_server.go index 5375c574f..a613be253 100644 --- a/rpc/server/http_server.go +++ b/rpc/server/http_server.go @@ -12,7 +12,7 @@ import ( "time" "github.com/pkg/errors" - types "github.com/tendermint/go-rpc/types" + types "github.com/tendermint/tendermint/rpc/types" ) func StartHTTPServer(listenAddr string, handler http.Handler) (listener net.Listener, err error) { @@ -20,7 +20,7 @@ func StartHTTPServer(listenAddr string, handler http.Handler) (listener net.List var proto, addr string parts := strings.SplitN(listenAddr, "://", 2) if len(parts) != 2 { - log.Warn("WARNING (go-rpc): Please use fully formed listening addresses, including the tcp:// or unix:// prefix") + log.Warn("WARNING (tendermint/rpc): Please use fully formed listening addresses, including the tcp:// or unix:// prefix") // we used to allow addrs without tcp/unix prefix by checking for a colon // TODO: Deprecate proto = types.SocketType(listenAddr) diff --git a/rpc/tendermint/client/httpclient.go b/rpc/tendermint/client/httpclient.go index 8e661443f..e8f404d22 100644 --- a/rpc/tendermint/client/httpclient.go +++ b/rpc/tendermint/client/httpclient.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" data "github.com/tendermint/go-wire/data" events "github.com/tendermint/tmlibs/events" - "github.com/tendermint/go-rpc/client" + "github.com/tendermint/tendermint/rpc/client" wire "github.com/tendermint/go-wire" ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" "github.com/tendermint/tendermint/types" diff --git a/rpc/tendermint/core/events.go b/rpc/tendermint/core/events.go index a92eda3d7..e12122e57 100644 --- a/rpc/tendermint/core/events.go +++ b/rpc/tendermint/core/events.go @@ -1,7 +1,7 @@ package core import ( - "github.com/tendermint/go-rpc/types" + "github.com/tendermint/tendermint/rpc/types" ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" "github.com/tendermint/tendermint/types" ) diff --git a/rpc/tendermint/core/routes.go b/rpc/tendermint/core/routes.go index d50968eee..1ed874f28 100644 --- a/rpc/tendermint/core/routes.go +++ b/rpc/tendermint/core/routes.go @@ -2,8 +2,8 @@ package core import ( data "github.com/tendermint/go-wire/data" - rpc "github.com/tendermint/go-rpc/server" - "github.com/tendermint/go-rpc/types" + rpc "github.com/tendermint/tendermint/rpc/server" + "github.com/tendermint/tendermint/rpc/types" ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" "github.com/tendermint/tendermint/types" ) diff --git a/rpc/tendermint/core/types/responses.go b/rpc/tendermint/core/types/responses.go index ba4584830..6f276def9 100644 --- a/rpc/tendermint/core/types/responses.go +++ b/rpc/tendermint/core/types/responses.go @@ -7,7 +7,7 @@ import ( "github.com/tendermint/go-crypto" data "github.com/tendermint/go-wire/data" "github.com/tendermint/go-p2p" - "github.com/tendermint/go-rpc/types" + "github.com/tendermint/tendermint/rpc/types" "github.com/tendermint/go-wire" "github.com/tendermint/tendermint/types" ) diff --git a/rpc/tendermint/test/client_test.go b/rpc/tendermint/test/client_test.go index 9c1bbd8d7..fda9fca27 100644 --- a/rpc/tendermint/test/client_test.go +++ b/rpc/tendermint/test/client_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/abci/types" . "github.com/tendermint/tmlibs/common" - rpc "github.com/tendermint/go-rpc/client" + rpc "github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/rpc/tendermint/core" ctypes "github.com/tendermint/tendermint/rpc/tendermint/core/types" "github.com/tendermint/tendermint/state/txindex/null" diff --git a/rpc/tendermint/test/helpers.go b/rpc/tendermint/test/helpers.go index 6f7050f8b..e5a2fb4e2 100644 --- a/rpc/tendermint/test/helpers.go +++ b/rpc/tendermint/test/helpers.go @@ -15,7 +15,7 @@ import ( abci "github.com/tendermint/abci/types" cfg "github.com/tendermint/go-config" - client "github.com/tendermint/go-rpc/client" + client "github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/config/tendermint_test" nm "github.com/tendermint/tendermint/node" "github.com/tendermint/tendermint/proxy" diff --git a/rpc/test/main.go b/rpc/test/main.go index 59c6e9b8f..ea91fcfd0 100644 --- a/rpc/test/main.go +++ b/rpc/test/main.go @@ -5,7 +5,7 @@ import ( "net/http" cmn "github.com/tendermint/tmlibs/common" - rpcserver "github.com/tendermint/go-rpc/server" + rpcserver "github.com/tendermint/tendermint/rpc/server" ) var routes = map[string]*rpcserver.RPCFunc{ diff --git a/test/test_libs.sh b/test/test_libs.sh index bf1b0096c..cb5090e1c 100644 --- a/test/test_libs.sh +++ b/test/test_libs.sh @@ -15,7 +15,7 @@ fi # some libs are tested with go, others with make # TODO: should be all make (post repo merge) LIBS_GO_TEST=(tmlibs/clist tmlibs/common go-config go-crypto tmlibs/db tmlibs/events go-merkle go-p2p) -LIBS_MAKE_TEST=(go-rpc go-wire abci) +LIBS_MAKE_TEST=(tendermint/rpc go-wire abci) for lib in "${LIBS_GO_TEST[@]}"; do