From d17d4fa1067f83447f09b756cb45565bcae50ac8 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sun, 14 Feb 2016 15:03:55 -0800 Subject: [PATCH] Fix tmsp/example import paths --- consensus/common_test.go | 4 ++-- mempool/mempool_test.go | 4 ++-- node/node.go | 4 ++-- proxy/remote_app_conn_test.go | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/consensus/common_test.go b/consensus/common_test.go index 08912665..0629d51b 100644 --- a/consensus/common_test.go +++ b/consensus/common_test.go @@ -17,7 +17,7 @@ import ( sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" - "github.com/tendermint/tmsp/example/golang" + "github.com/tendermint/tmsp/example/counter" ) var chainID string @@ -311,7 +311,7 @@ func newConsensusState(state *sm.State, pv *types.PrivValidator) *ConsensusState blockStore := bc.NewBlockStore(blockDB) // one for mempool, one for consensus - mtx, app := new(sync.Mutex), example.NewCounterApplication(false) + mtx, app := new(sync.Mutex), counter.NewCounterApplication(false) proxyAppConnMem := proxy.NewLocalAppConn(mtx, app) proxyAppConnCon := proxy.NewLocalAppConn(mtx, app) diff --git a/mempool/mempool_test.go b/mempool/mempool_test.go index 67293765..b4a10423 100644 --- a/mempool/mempool_test.go +++ b/mempool/mempool_test.go @@ -7,13 +7,13 @@ import ( "github.com/tendermint/tendermint/proxy" "github.com/tendermint/tendermint/types" - "github.com/tendermint/tmsp/example/golang" + "github.com/tendermint/tmsp/example/counter" tmsp "github.com/tendermint/tmsp/types" ) func TestSerialReap(t *testing.T) { - app := example.NewCounterApplication(true) + app := counter.NewCounterApplication(true) app.SetOption("serial", "on") mtx := new(sync.Mutex) appConnMem := proxy.NewLocalAppConn(mtx, app) diff --git a/node/node.go b/node/node.go index bf5e8294..d3442928 100644 --- a/node/node.go +++ b/node/node.go @@ -25,7 +25,7 @@ import ( sm "github.com/tendermint/tendermint/state" "github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/version" - "github.com/tendermint/tmsp/example/golang" + "github.com/tendermint/tmsp/example/dummy" ) import _ "net/http/pprof" @@ -230,7 +230,7 @@ func makeNodeInfo(sw *p2p.Switch, privKey crypto.PrivKeyEd25519) *p2p.NodeInfo { func getProxyApp(addr string, hash []byte) (proxyAppConn proxy.AppConn) { // use local app (for testing) if addr == "local" { - app := example.NewDummyApplication() + app := dummy.NewDummyApplication() mtx := new(sync.Mutex) proxyAppConn = proxy.NewLocalAppConn(mtx, app) } else { diff --git a/proxy/remote_app_conn_test.go b/proxy/remote_app_conn_test.go index 14d01693..a997cbfe 100644 --- a/proxy/remote_app_conn_test.go +++ b/proxy/remote_app_conn_test.go @@ -5,7 +5,7 @@ import ( "testing" . "github.com/tendermint/go-common" - "github.com/tendermint/tmsp/example/golang" + "github.com/tendermint/tmsp/example/dummy" "github.com/tendermint/tmsp/server" ) @@ -13,7 +13,7 @@ func TestEcho(t *testing.T) { sockPath := Fmt("unix:///tmp/echo_%v.sock", RandStr(6)) // Start server - _, err := server.StartListener(sockPath, example.NewDummyApplication()) + _, err := server.StartListener(sockPath, dummy.NewDummyApplication()) if err != nil { Exit(err.Error()) } @@ -35,7 +35,7 @@ func BenchmarkEcho(b *testing.B) { b.StopTimer() // Initialize sockPath := Fmt("unix:///tmp/echo_%v.sock", RandStr(6)) // Start server - _, err := server.StartListener(sockPath, example.NewDummyApplication()) + _, err := server.StartListener(sockPath, dummy.NewDummyApplication()) if err != nil { Exit(err.Error()) } @@ -62,7 +62,7 @@ func BenchmarkEcho(b *testing.B) { func TestInfo(t *testing.T) { sockPath := Fmt("unix:///tmp/echo_%v.sock", RandStr(6)) // Start server - _, err := server.StartListener(sockPath, example.NewDummyApplication()) + _, err := server.StartListener(sockPath, dummy.NewDummyApplication()) if err != nil { Exit(err.Error()) }