abci: Refactor ABCI CheckTx and DeliverTx signatures (#3735)

* Refactor signature of Application.CheckTx

* Refactor signature of Application.DeliverTx

* Refactor example variable names for clarity and consistency

* Rename method variables for consistency

* Rename method variables for consistency

* add a changelog entry

* update docs
This commit is contained in:
Thane Thomson
2019-06-21 01:56:27 -04:00
committed by Anton Kaliaev
parent 1b5110e91f
commit 9d5ba576ee
16 changed files with 127 additions and 116 deletions

View File

@ -85,7 +85,7 @@ func (app *localClient) DeliverTxAsync(tx []byte) *ReqRes {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.DeliverTx(tx)
res := app.Application.DeliverTx(types.RequestDeliverTx{Tx: tx})
return app.callback(
types.ToRequestDeliverTx(tx),
types.ToResponseDeliverTx(res),
@ -96,7 +96,7 @@ func (app *localClient) CheckTxAsync(tx []byte) *ReqRes {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.CheckTx(tx)
res := app.Application.CheckTx(types.RequestCheckTx{Tx: tx})
return app.callback(
types.ToRequestCheckTx(tx),
types.ToResponseCheckTx(res),
@ -188,7 +188,7 @@ func (app *localClient) DeliverTxSync(tx []byte) (*types.ResponseDeliverTx, erro
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.DeliverTx(tx)
res := app.Application.DeliverTx(types.RequestDeliverTx{Tx: tx})
return &res, nil
}
@ -196,7 +196,7 @@ func (app *localClient) CheckTxSync(tx []byte) (*types.ResponseCheckTx, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.CheckTx(tx)
res := app.Application.CheckTx(types.RequestCheckTx{Tx: tx})
return &res, nil
}