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.

20 lines
489 B

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