@@ -53,21 +53,21 @@ func (app *localClient) EchoAsync(msg string) *ReqRes {
5353
5454func (app * localClient ) InfoAsync (req types.RequestInfo ) * ReqRes {
5555 app .mtx .Lock ()
56- res := app .Application .Info (req )
56+ res := app .Application .Info (types . ToParamsInfo ( req ) )
5757 app .mtx .Unlock ()
5858 return app .callback (
5959 types .ToRequestInfo (req ),
60- types .ToResponseInfo (res ),
60+ types .ToResponseInfo (types . FromResultInfo ( res ) ),
6161 )
6262}
6363
6464func (app * localClient ) SetOptionAsync (req types.RequestSetOption ) * ReqRes {
6565 app .mtx .Lock ()
66- res := app .Application .SetOption (req )
66+ res := app .Application .SetOption (types . ToParamsSetOption ( req ) )
6767 app .mtx .Unlock ()
6868 return app .callback (
6969 types .ToRequestSetOption (req ),
70- types .ToResponseSetOption (res ),
70+ types .ToResponseSetOption (types . FromResultSetOption ( res ) ),
7171 )
7272}
7373
@@ -77,7 +77,7 @@ func (app *localClient) DeliverTxAsync(tx []byte) *ReqRes {
7777 app .mtx .Unlock ()
7878 return app .callback (
7979 types .ToRequestDeliverTx (tx ),
80- types .ToResponseDeliverTx (res ),
80+ types .ToResponseDeliverTx (types . FromResultDeliverTx ( res ) ),
8181 )
8282}
8383
@@ -87,17 +87,17 @@ func (app *localClient) CheckTxAsync(tx []byte) *ReqRes {
8787 app .mtx .Unlock ()
8888 return app .callback (
8989 types .ToRequestCheckTx (tx ),
90- types .ToResponseCheckTx (res ),
90+ types .ToResponseCheckTx (types . FromResultCheckTx ( res ) ),
9191 )
9292}
9393
9494func (app * localClient ) QueryAsync (req types.RequestQuery ) * ReqRes {
9595 app .mtx .Lock ()
96- res := app .Application .Query (req )
96+ res := app .Application .Query (types . ToParamsQuery ( req ) )
9797 app .mtx .Unlock ()
9898 return app .callback (
9999 types .ToRequestQuery (req ),
100- types .ToResponseQuery (res ),
100+ types .ToResponseQuery (types . FromResultQuery ( res ) ),
101101 )
102102}
103103
@@ -107,38 +107,38 @@ func (app *localClient) CommitAsync() *ReqRes {
107107 app .mtx .Unlock ()
108108 return app .callback (
109109 types .ToRequestCommit (),
110- types .ToResponseCommit (res ),
110+ types .ToResponseCommit (types . FromResultCommit ( res ) ),
111111 )
112112}
113113
114114func (app * localClient ) InitChainAsync (req types.RequestInitChain ) * ReqRes {
115115 app .mtx .Lock ()
116- res := app .Application .InitChain (req )
116+ res := app .Application .InitChain (types . ToParamsInitChain ( req ) )
117117 reqRes := app .callback (
118118 types .ToRequestInitChain (req ),
119- types .ToResponseInitChain (res ),
119+ types .ToResponseInitChain (types . FromResultInitChain ( res ) ),
120120 )
121121 app .mtx .Unlock ()
122122 return reqRes
123123}
124124
125125func (app * localClient ) BeginBlockAsync (req types.RequestBeginBlock ) * ReqRes {
126126 app .mtx .Lock ()
127- res := app .Application .BeginBlock (req )
127+ res := app .Application .BeginBlock (types . ToParamsBeginBlock ( req ) )
128128 app .mtx .Unlock ()
129129 return app .callback (
130130 types .ToRequestBeginBlock (req ),
131- types .ToResponseBeginBlock (res ),
131+ types .ToResponseBeginBlock (types . FromResultBeginBlock ( res ) ),
132132 )
133133}
134134
135135func (app * localClient ) EndBlockAsync (req types.RequestEndBlock ) * ReqRes {
136136 app .mtx .Lock ()
137- res := app .Application .EndBlock (req )
137+ res := app .Application .EndBlock (types . ToParamsEndBlock ( req ) )
138138 app .mtx .Unlock ()
139139 return app .callback (
140140 types .ToRequestEndBlock (req ),
141- types .ToResponseEndBlock (res ),
141+ types .ToResponseEndBlock (types . FromResultEndBlock ( res ) ),
142142 )
143143}
144144
@@ -154,63 +154,63 @@ func (app *localClient) EchoSync(msg string) (*types.ResponseEcho, error) {
154154
155155func (app * localClient ) InfoSync (req types.RequestInfo ) (* types.ResponseInfo , error ) {
156156 app .mtx .Lock ()
157- res := app .Application .Info (req )
157+ res := types . FromResultInfo ( app .Application .Info (types . ToParamsInfo ( req )) )
158158 app .mtx .Unlock ()
159159 return & res , nil
160160}
161161
162162func (app * localClient ) SetOptionSync (req types.RequestSetOption ) (* types.ResponseSetOption , error ) {
163163 app .mtx .Lock ()
164- res := app .Application .SetOption (req )
164+ res := types . FromResultSetOption ( app .Application .SetOption (types . ToParamsSetOption ( req )) )
165165 app .mtx .Unlock ()
166166 return & res , nil
167167}
168168
169169func (app * localClient ) DeliverTxSync (tx []byte ) (* types.ResponseDeliverTx , error ) {
170170 app .mtx .Lock ()
171- res := app .Application .DeliverTx (tx )
171+ res := types . FromResultDeliverTx ( app .Application .DeliverTx (tx ) )
172172 app .mtx .Unlock ()
173173 return & res , nil
174174}
175175
176176func (app * localClient ) CheckTxSync (tx []byte ) (* types.ResponseCheckTx , error ) {
177177 app .mtx .Lock ()
178- res := app .Application .CheckTx (tx )
178+ res := types . FromResultCheckTx ( app .Application .CheckTx (tx ) )
179179 app .mtx .Unlock ()
180180 return & res , nil
181181}
182182
183183func (app * localClient ) QuerySync (req types.RequestQuery ) (* types.ResponseQuery , error ) {
184184 app .mtx .Lock ()
185- res := app .Application .Query (req )
185+ res := types . FromResultQuery ( app .Application .Query (types . ToParamsQuery ( req )) )
186186 app .mtx .Unlock ()
187187 return & res , nil
188188}
189189
190190func (app * localClient ) CommitSync () (* types.ResponseCommit , error ) {
191191 app .mtx .Lock ()
192- res := app .Application .Commit ()
192+ res := types . FromResultCommit ( app .Application .Commit () )
193193 app .mtx .Unlock ()
194194 return & res , nil
195195}
196196
197197func (app * localClient ) InitChainSync (req types.RequestInitChain ) (* types.ResponseInitChain , error ) {
198198 app .mtx .Lock ()
199- res := app .Application .InitChain (req )
199+ res := types . FromResultInitChain ( app .Application .InitChain (types . ToParamsInitChain ( req )) )
200200 app .mtx .Unlock ()
201201 return & res , nil
202202}
203203
204204func (app * localClient ) BeginBlockSync (req types.RequestBeginBlock ) (* types.ResponseBeginBlock , error ) {
205205 app .mtx .Lock ()
206- res := app .Application .BeginBlock (req )
206+ res := types . FromResultBeginBlock ( app .Application .BeginBlock (types . ToParamsBeginBlock ( req )) )
207207 app .mtx .Unlock ()
208208 return & res , nil
209209}
210210
211211func (app * localClient ) EndBlockSync (req types.RequestEndBlock ) (* types.ResponseEndBlock , error ) {
212212 app .mtx .Lock ()
213- res := app .Application .EndBlock (req )
213+ res := types . FromResultEndBlock ( app .Application .EndBlock (types . ToParamsEndBlock ( req )) )
214214 app .mtx .Unlock ()
215215 return & res , nil
216216}
0 commit comments