consolidate example tests; grpc fail fast

This commit is contained in:
Ethan Buchman
2016-08-10 18:29:46 -04:00
parent a8066f9c82
commit 1b13f14e08
11 changed files with 378 additions and 355 deletions

View File

@ -1,11 +1,14 @@
package tmspcli
import (
types "github.com/tendermint/tmsp/types"
"sync"
. "github.com/tendermint/go-common"
types "github.com/tendermint/tmsp/types"
)
type localClient struct {
*BaseService
mtx *sync.Mutex
types.Application
Callback
@ -15,10 +18,12 @@ func NewLocalClient(mtx *sync.Mutex, app types.Application) *localClient {
if mtx == nil {
mtx = new(sync.Mutex)
}
return &localClient{
cli := &localClient{
mtx: mtx,
Application: app,
}
cli.BaseService = NewBaseService(log, "localClient", cli)
return cli
}
func (app *localClient) SetResponseCallback(cb Callback) {
@ -32,10 +37,6 @@ func (app *localClient) Error() error {
return nil
}
func (app *localClient) Stop() bool {
return true
}
func (app *localClient) FlushAsync() *ReqRes {
// Do nothing
return newLocalReqRes(types.ToRequestFlush(), nil)