@@ -53,21 +53,21 @@ func (app *localClient) EchoAsync(msg string) *ReqRes {
53
53
54
54
func (app * localClient ) InfoAsync (req types.RequestInfo ) * ReqRes {
55
55
app .mtx .Lock ()
56
- res := app .Application .Info (req )
56
+ res := app .Application .Info (types . ToParamsInfo ( req ) )
57
57
app .mtx .Unlock ()
58
58
return app .callback (
59
59
types .ToRequestInfo (req ),
60
- types .ToResponseInfo (res ),
60
+ types .ToResponseInfo (types . FromResultInfo ( res ) ),
61
61
)
62
62
}
63
63
64
64
func (app * localClient ) SetOptionAsync (req types.RequestSetOption ) * ReqRes {
65
65
app .mtx .Lock ()
66
- res := app .Application .SetOption (req )
66
+ res := app .Application .SetOption (types . ToParamsSetOption ( req ) )
67
67
app .mtx .Unlock ()
68
68
return app .callback (
69
69
types .ToRequestSetOption (req ),
70
- types .ToResponseSetOption (res ),
70
+ types .ToResponseSetOption (types . FromResultSetOption ( res ) ),
71
71
)
72
72
}
73
73
@@ -77,7 +77,7 @@ func (app *localClient) DeliverTxAsync(tx []byte) *ReqRes {
77
77
app .mtx .Unlock ()
78
78
return app .callback (
79
79
types .ToRequestDeliverTx (tx ),
80
- types .ToResponseDeliverTx (res ),
80
+ types .ToResponseDeliverTx (types . FromResultDeliverTx ( res ) ),
81
81
)
82
82
}
83
83
@@ -87,17 +87,17 @@ func (app *localClient) CheckTxAsync(tx []byte) *ReqRes {
87
87
app .mtx .Unlock ()
88
88
return app .callback (
89
89
types .ToRequestCheckTx (tx ),
90
- types .ToResponseCheckTx (res ),
90
+ types .ToResponseCheckTx (types . FromResultCheckTx ( res ) ),
91
91
)
92
92
}
93
93
94
94
func (app * localClient ) QueryAsync (req types.RequestQuery ) * ReqRes {
95
95
app .mtx .Lock ()
96
- res := app .Application .Query (req )
96
+ res := app .Application .Query (types . ToParamsQuery ( req ) )
97
97
app .mtx .Unlock ()
98
98
return app .callback (
99
99
types .ToRequestQuery (req ),
100
- types .ToResponseQuery (res ),
100
+ types .ToResponseQuery (types . FromResultQuery ( res ) ),
101
101
)
102
102
}
103
103
@@ -107,38 +107,38 @@ func (app *localClient) CommitAsync() *ReqRes {
107
107
app .mtx .Unlock ()
108
108
return app .callback (
109
109
types .ToRequestCommit (),
110
- types .ToResponseCommit (res ),
110
+ types .ToResponseCommit (types . FromResultCommit ( res ) ),
111
111
)
112
112
}
113
113
114
114
func (app * localClient ) InitChainAsync (req types.RequestInitChain ) * ReqRes {
115
115
app .mtx .Lock ()
116
- res := app .Application .InitChain (req )
116
+ res := app .Application .InitChain (types . ToParamsInitChain ( req ) )
117
117
reqRes := app .callback (
118
118
types .ToRequestInitChain (req ),
119
- types .ToResponseInitChain (res ),
119
+ types .ToResponseInitChain (types . FromResultInitChain ( res ) ),
120
120
)
121
121
app .mtx .Unlock ()
122
122
return reqRes
123
123
}
124
124
125
125
func (app * localClient ) BeginBlockAsync (req types.RequestBeginBlock ) * ReqRes {
126
126
app .mtx .Lock ()
127
- res := app .Application .BeginBlock (req )
127
+ res := app .Application .BeginBlock (types . ToParamsBeginBlock ( req ) )
128
128
app .mtx .Unlock ()
129
129
return app .callback (
130
130
types .ToRequestBeginBlock (req ),
131
- types .ToResponseBeginBlock (res ),
131
+ types .ToResponseBeginBlock (types . FromResultBeginBlock ( res ) ),
132
132
)
133
133
}
134
134
135
135
func (app * localClient ) EndBlockAsync (req types.RequestEndBlock ) * ReqRes {
136
136
app .mtx .Lock ()
137
- res := app .Application .EndBlock (req )
137
+ res := app .Application .EndBlock (types . ToParamsEndBlock ( req ) )
138
138
app .mtx .Unlock ()
139
139
return app .callback (
140
140
types .ToRequestEndBlock (req ),
141
- types .ToResponseEndBlock (res ),
141
+ types .ToResponseEndBlock (types . FromResultEndBlock ( res ) ),
142
142
)
143
143
}
144
144
@@ -154,63 +154,63 @@ func (app *localClient) EchoSync(msg string) (*types.ResponseEcho, error) {
154
154
155
155
func (app * localClient ) InfoSync (req types.RequestInfo ) (* types.ResponseInfo , error ) {
156
156
app .mtx .Lock ()
157
- res := app .Application .Info (req )
157
+ res := types . FromResultInfo ( app .Application .Info (types . ToParamsInfo ( req )) )
158
158
app .mtx .Unlock ()
159
159
return & res , nil
160
160
}
161
161
162
162
func (app * localClient ) SetOptionSync (req types.RequestSetOption ) (* types.ResponseSetOption , error ) {
163
163
app .mtx .Lock ()
164
- res := app .Application .SetOption (req )
164
+ res := types . FromResultSetOption ( app .Application .SetOption (types . ToParamsSetOption ( req )) )
165
165
app .mtx .Unlock ()
166
166
return & res , nil
167
167
}
168
168
169
169
func (app * localClient ) DeliverTxSync (tx []byte ) (* types.ResponseDeliverTx , error ) {
170
170
app .mtx .Lock ()
171
- res := app .Application .DeliverTx (tx )
171
+ res := types . FromResultDeliverTx ( app .Application .DeliverTx (tx ) )
172
172
app .mtx .Unlock ()
173
173
return & res , nil
174
174
}
175
175
176
176
func (app * localClient ) CheckTxSync (tx []byte ) (* types.ResponseCheckTx , error ) {
177
177
app .mtx .Lock ()
178
- res := app .Application .CheckTx (tx )
178
+ res := types . FromResultCheckTx ( app .Application .CheckTx (tx ) )
179
179
app .mtx .Unlock ()
180
180
return & res , nil
181
181
}
182
182
183
183
func (app * localClient ) QuerySync (req types.RequestQuery ) (* types.ResponseQuery , error ) {
184
184
app .mtx .Lock ()
185
- res := app .Application .Query (req )
185
+ res := types . FromResultQuery ( app .Application .Query (types . ToParamsQuery ( req )) )
186
186
app .mtx .Unlock ()
187
187
return & res , nil
188
188
}
189
189
190
190
func (app * localClient ) CommitSync () (* types.ResponseCommit , error ) {
191
191
app .mtx .Lock ()
192
- res := app .Application .Commit ()
192
+ res := types . FromResultCommit ( app .Application .Commit () )
193
193
app .mtx .Unlock ()
194
194
return & res , nil
195
195
}
196
196
197
197
func (app * localClient ) InitChainSync (req types.RequestInitChain ) (* types.ResponseInitChain , error ) {
198
198
app .mtx .Lock ()
199
- res := app .Application .InitChain (req )
199
+ res := types . FromResultInitChain ( app .Application .InitChain (types . ToParamsInitChain ( req )) )
200
200
app .mtx .Unlock ()
201
201
return & res , nil
202
202
}
203
203
204
204
func (app * localClient ) BeginBlockSync (req types.RequestBeginBlock ) (* types.ResponseBeginBlock , error ) {
205
205
app .mtx .Lock ()
206
- res := app .Application .BeginBlock (req )
206
+ res := types . FromResultBeginBlock ( app .Application .BeginBlock (types . ToParamsBeginBlock ( req )) )
207
207
app .mtx .Unlock ()
208
208
return & res , nil
209
209
}
210
210
211
211
func (app * localClient ) EndBlockSync (req types.RequestEndBlock ) (* types.ResponseEndBlock , error ) {
212
212
app .mtx .Lock ()
213
- res := app .Application .EndBlock (req )
213
+ res := types . FromResultEndBlock ( app .Application .EndBlock (types . ToParamsEndBlock ( req )) )
214
214
app .mtx .Unlock ()
215
215
return & res , nil
216
216
}
0 commit comments