CheckTx and DeliverTx return ResponseCheckTx and ResponseDeliverTx respectively

Commit now returns ResponseCommit
This commit is contained in:
Anton Kaliaev
2017-11-20 20:26:37 -06:00
parent 92801dbd72
commit 3a3d508e5c
7 changed files with 74 additions and 44 deletions

View File

@ -164,14 +164,14 @@ func (app *localClient) SetOptionSync(key string, value string) (res types.Resul
return types.OK.SetLog(log)
}
func (app *localClient) DeliverTxSync(tx []byte) (res types.Result) {
func (app *localClient) DeliverTxSync(tx []byte) (res types.ResponseDeliverTx) {
app.mtx.Lock()
res = app.Application.DeliverTx(tx)
app.mtx.Unlock()
return res
}
func (app *localClient) CheckTxSync(tx []byte) (res types.Result) {
func (app *localClient) CheckTxSync(tx []byte) (res types.ResponseCheckTx) {
app.mtx.Lock()
res = app.Application.CheckTx(tx)
app.mtx.Unlock()
@ -185,7 +185,7 @@ func (app *localClient) QuerySync(reqQuery types.RequestQuery) (resQuery types.R
return resQuery, nil
}
func (app *localClient) CommitSync() (res types.Result) {
func (app *localClient) CommitSync() (res types.ResponseCommit) {
app.mtx.Lock()
res = app.Application.Commit()
app.mtx.Unlock()