You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
464 B

  1. package rpctest
  2. import (
  3. "testing"
  4. "golang.org/x/net/context"
  5. "github.com/stretchr/testify/require"
  6. core_grpc "github.com/tendermint/tendermint/rpc/grpc"
  7. )
  8. func TestBroadcastTx(t *testing.T) {
  9. require := require.New(t)
  10. res, err := GetGRPCClient().BroadcastTx(context.Background(), &core_grpc.RequestBroadcastTx{[]byte("this is a tx")})
  11. require.Nil(err, "%+v", err)
  12. require.EqualValues(0, res.CheckTx.Code)
  13. require.EqualValues(0, res.DeliverTx.Code)
  14. }