mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 21:31:23 +00:00
Clean up package names
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package httpclient_test
|
||||
package http_test
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
package httpclient returns a Client implementation that communicates
|
||||
package http returns a Client implementation that communicates
|
||||
with a tendermint node over json rpc and websockets.
|
||||
|
||||
This is the main implementation you probably want to use in
|
||||
@ -7,7 +7,7 @@ production code. There are other implementations when calling
|
||||
the tendermint node in-process (local), or when you want to mock
|
||||
out the server for test code (mock).
|
||||
*/
|
||||
package httpclient
|
||||
package http
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package httpclient_test
|
||||
package http_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package httpclient_test
|
||||
package http_test
|
||||
|
||||
import (
|
||||
"strings"
|
||||
@ -8,15 +8,15 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
merkle "github.com/tendermint/go-merkle"
|
||||
httpclient "github.com/tendermint/tendermint/rpc/client/http"
|
||||
"github.com/tendermint/tendermint/rpc/client/http"
|
||||
rpctest "github.com/tendermint/tendermint/rpc/test"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
// GetClient gets a rpc client pointing to the test tendermint rpc
|
||||
func GetClient() *httpclient.Client {
|
||||
func GetClient() *http.Client {
|
||||
rpcAddr := rpctest.GetConfig().GetString("rpc_laddr")
|
||||
return httpclient.New(rpcAddr, "/websocket")
|
||||
return http.New(rpcAddr, "/websocket")
|
||||
}
|
||||
|
||||
// Make sure status is correct (we connect properly)
|
||||
|
@ -1,4 +1,4 @@
|
||||
package localclient_test
|
||||
package local_test
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
package localclient returns a Client implementation that
|
||||
package local returns a Client implementation that
|
||||
directly executes the rpc functions on a given node.
|
||||
|
||||
This implementation is useful for:
|
||||
@ -12,7 +12,7 @@ are compiled in process.
|
||||
For real clients, you probably want the "http" package. For more
|
||||
powerful control during testing, you probably want the "mock" package.
|
||||
*/
|
||||
package localclient
|
||||
package local
|
||||
|
||||
import (
|
||||
nm "github.com/tendermint/tendermint/node"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package localclient_test
|
||||
package local_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
@ -1,4 +1,4 @@
|
||||
package localclient_test
|
||||
package local_test
|
||||
|
||||
import (
|
||||
"strings"
|
||||
@ -8,14 +8,14 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
merkle "github.com/tendermint/go-merkle"
|
||||
localclient "github.com/tendermint/tendermint/rpc/client/local"
|
||||
"github.com/tendermint/tendermint/rpc/client/local"
|
||||
rpctest "github.com/tendermint/tendermint/rpc/test"
|
||||
)
|
||||
|
||||
// GetClient gets a rpc client pointing to the test tendermint rpc
|
||||
func GetClient() localclient.Client {
|
||||
func GetClient() local.Client {
|
||||
node := rpctest.GetNode()
|
||||
return localclient.New(node)
|
||||
return local.New(node)
|
||||
}
|
||||
|
||||
// Make sure status is correct (we connect properly)
|
||||
|
Reference in New Issue
Block a user