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
410 B

  1. package core_grpc
  2. import (
  3. core "github.com/tendermint/tendermint/rpc/core"
  4. context "golang.org/x/net/context"
  5. )
  6. type broadcastAPI struct {
  7. }
  8. func (bapi *broadcastAPI) BroadcastTx(ctx context.Context, req *RequestBroadcastTx) (*ResponseBroadcastTx, error) {
  9. res, err := core.BroadcastTxCommit(req.Tx)
  10. if err != nil {
  11. return nil, err
  12. }
  13. return &ResponseBroadcastTx{res.CheckTx, res.DeliverTx}, nil
  14. }