mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-24 02:01:43 +00:00
broadcast_tx via grpc
This commit is contained in:
21
rpc/test/grpc_test.go
Normal file
21
rpc/test/grpc_test.go
Normal 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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user