mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-13 11:34:17 +00:00
Refactor to move common libraries out of project
This commit is contained in:
@@ -7,9 +7,9 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
. "github.com/tendermint/go-common"
|
||||
. "github.com/tendermint/tendermint/rpc/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
"github.com/tendermint/go-wire"
|
||||
)
|
||||
|
||||
func Call(remote string, method string, params []interface{}, dest interface{}) (interface{}, error) {
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
|
||||
package rpcclient
|
||||
|
||||
import (
|
||||
"github.com/tendermint/tendermint/Godeps/_workspace/src/github.com/tendermint/log15"
|
||||
"github.com/tendermint/log15"
|
||||
)
|
||||
|
||||
var log = log15.New("module", "rpcclient")
|
||||
|
||||
@@ -3,7 +3,7 @@ package core
|
||||
import (
|
||||
"fmt"
|
||||
acm "github.com/tendermint/tendermint/account"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
. "github.com/tendermint/go-common"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package core
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
. "github.com/tendermint/go-common"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
cfg "github.com/tendermint/go-config"
|
||||
)
|
||||
|
||||
var config cfg.Config = nil
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
cm "github.com/tendermint/tendermint/consensus"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
"github.com/tendermint/go-wire"
|
||||
)
|
||||
|
||||
func ListValidators() (*ctypes.ResultListValidators, error) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"github.com/tendermint/tendermint/Godeps/_workspace/src/github.com/tendermint/log15"
|
||||
"github.com/tendermint/log15"
|
||||
)
|
||||
|
||||
var log = log15.New("module", "rpc")
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
dbm "github.com/tendermint/tendermint/db"
|
||||
dbm "github.com/tendermint/go-db"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
sm "github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
||||
bc "github.com/tendermint/tendermint/blockchain"
|
||||
"github.com/tendermint/tendermint/consensus"
|
||||
mempl "github.com/tendermint/tendermint/mempool"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/go-p2p"
|
||||
stypes "github.com/tendermint/tendermint/state/types"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package core
|
||||
import (
|
||||
"fmt"
|
||||
acm "github.com/tendermint/tendermint/account"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
. "github.com/tendermint/go-common"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
"github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
acm "github.com/tendermint/tendermint/account"
|
||||
stypes "github.com/tendermint/tendermint/state/types"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
"github.com/tendermint/go-wire"
|
||||
)
|
||||
|
||||
type ResultGetStorage struct {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
rpctypes "github.com/tendermint/tendermint/rpc/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
"github.com/tendermint/go-wire"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
package core_client
|
||||
|
||||
import (
|
||||
"github.com/tendermint/tendermint/Godeps/_workspace/src/github.com/tendermint/log15"
|
||||
"github.com/tendermint/log15"
|
||||
)
|
||||
|
||||
var log = log15.New("module", "core_client")
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/Godeps/_workspace/src/github.com/gorilla/websocket"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
"github.com/gorilla/websocket"
|
||||
. "github.com/tendermint/go-common"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
"github.com/tendermint/tendermint/rpc/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
"github.com/tendermint/go-wire"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package rpcserver
|
||||
|
||||
import (
|
||||
@@ -11,13 +12,13 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/Godeps/_workspace/src/github.com/gorilla/websocket"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
"github.com/gorilla/websocket"
|
||||
. "github.com/tendermint/go-common"
|
||||
"github.com/tendermint/tendermint/events"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
. "github.com/tendermint/tendermint/rpc/types"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
"github.com/tendermint/go-wire"
|
||||
)
|
||||
|
||||
func RegisterRPCFuncs(mux *http.ServeMux, funcMap map[string]*RPCFunc) {
|
||||
|
||||
@@ -11,9 +11,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/alert"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
. "github.com/tendermint/go-common"
|
||||
. "github.com/tendermint/tendermint/rpc/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
"github.com/tendermint/go-wire"
|
||||
)
|
||||
|
||||
func StartHTTPServer(listenAddr string, handler http.Handler) (net.Listener, error) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package rpcserver
|
||||
|
||||
import (
|
||||
"github.com/tendermint/tendermint/Godeps/_workspace/src/github.com/tendermint/log15"
|
||||
"github.com/tendermint/log15"
|
||||
)
|
||||
|
||||
var log = log15.New("module", "rpcserver")
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package rpctest
|
||||
|
||||
import (
|
||||
cfg "github.com/tendermint/tendermint/config"
|
||||
cfg "github.com/tendermint/go-config"
|
||||
)
|
||||
|
||||
var config cfg.Config = nil
|
||||
|
||||
+2
-2
@@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
|
||||
acm "github.com/tendermint/tendermint/account"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
. "github.com/tendermint/go-common"
|
||||
nm "github.com/tendermint/tendermint/node"
|
||||
"github.com/tendermint/tendermint/p2p"
|
||||
"github.com/tendermint/go-p2p"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
cclient "github.com/tendermint/tendermint/rpc/core_client"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package rpctest
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
. "github.com/tendermint/go-common"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -7,12 +7,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/tendermint/tendermint/Godeps/_workspace/src/github.com/gorilla/websocket"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/tendermint/go-wire"
|
||||
_ "github.com/tendermint/tendermint/config/tendermint_test"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
"github.com/tendermint/tendermint/rpc/types"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
)
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user