broadcast_tx via grpc

This commit is contained in:
Ethan Buchman
2016-06-21 13:19:49 -04:00
parent 538a50c9e8
commit db437e7a45
13 changed files with 573 additions and 4 deletions

21
rpc/test/grpc_test.go Normal file
View File

@ -0,0 +1,21 @@
package rpctest
import (
"testing"
"golang.org/x/net/context"
"github.com/tendermint/tendermint/rpc/grpc"
)
//-------------------------------------------
func TestBroadcastTx(t *testing.T) {
res, err := clientGRPC.BroadcastTx(context.Background(), &core_grpc.RequestBroadcastTx{[]byte("this is a tx")})
if err != nil {
t.Fatal(err)
}
if res.Code != 0 {
t.Fatalf("Non-zero code: %d", res.Code)
}
}