Cleanup of code and code docs

This cleans up some of the code in the state package
This commit is contained in:
Adrian Brink
2017-10-16 16:01:32 +02:00
committed by Ethan Buchman
parent fa56e8c0ce
commit 782a836db0
8 changed files with 127 additions and 84 deletions

View File

@ -12,6 +12,7 @@ import (
"strings"
"github.com/pkg/errors"
types "github.com/tendermint/tendermint/rpc/lib/types"
)
@ -60,12 +61,13 @@ func makeHTTPClient(remoteAddr string) (string, *http.Client) {
//------------------------------------------------------------------------------------
// JSON rpc takes params as a slice
// JSONRPCClient takes params as a slice
type JSONRPCClient struct {
address string
client *http.Client
}
// NewJSONRPCClient takes an address and returns a pointer to an instance of JSONRPCClient
func NewJSONRPCClient(remote string) *JSONRPCClient {
address, client := makeHTTPClient(remote)
return &JSONRPCClient{