rpc: response types use Result instead of pb Response

This commit is contained in:
Ethan Buchman
2017-04-27 19:34:25 -04:00
parent cdf650fba9
commit a518d08839
5 changed files with 47 additions and 19 deletions

View File

@ -3,6 +3,8 @@ package core_grpc
import (
core "github.com/tendermint/tendermint/rpc/core"
abci "github.com/tendermint/abci/types"
context "golang.org/x/net/context"
)
@ -14,5 +16,17 @@ func (bapi *broadcastAPI) BroadcastTx(ctx context.Context, req *RequestBroadcast
if err != nil {
return nil, err
}
return &ResponseBroadcastTx{res.CheckTx, res.DeliverTx}, nil
return &ResponseBroadcastTx{
CheckTx: &abci.ResponseCheckTx{
Code: res.CheckTx.Code,
Data: res.CheckTx.Data,
Log: res.CheckTx.Log,
},
DeliverTx: &abci.ResponseDeliverTx{
Code: res.DeliverTx.Code,
Data: res.DeliverTx.Data,
Log: res.DeliverTx.Log,
},
}, nil
}