rpc -> rpc/lib and rpc/tendermint -> rpc

This commit is contained in:
Ethan Buchman
2017-04-26 19:57:33 -04:00
parent cc7b2d26e5
commit cc6dde96c1
60 changed files with 78 additions and 78 deletions

18
rpc/grpc/api.go Normal file
View File

@@ -0,0 +1,18 @@
package core_grpc
import (
core "github.com/tendermint/tendermint/rpc/core"
context "golang.org/x/net/context"
)
type broadcastAPI struct {
}
func (bapi *broadcastAPI) BroadcastTx(ctx context.Context, req *RequestBroadcastTx) (*ResponseBroadcastTx, error) {
res, err := core.BroadcastTxCommit(req.Tx)
if err != nil {
return nil, err
}
return &ResponseBroadcastTx{res.CheckTx, res.DeliverTx}, nil
}