Browse Source

Fix tmsp/example import paths

pull/192/head
Jae Kwon 9 years ago
parent
commit
d17d4fa106
4 changed files with 10 additions and 10 deletions
  1. +2
    -2
      consensus/common_test.go
  2. +2
    -2
      mempool/mempool_test.go
  3. +2
    -2
      node/node.go
  4. +4
    -4
      proxy/remote_app_conn_test.go

+ 2
- 2
consensus/common_test.go View File

@ -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)


+ 2
- 2
mempool/mempool_test.go View File

@ -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)


+ 2
- 2
node/node.go View File

@ -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 {


+ 4
- 4
proxy/remote_app_conn_test.go View File

@ -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())
}


Loading…
Cancel
Save