mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 22:01:20 +00:00
Make fields in ResponseInfo be flat
This commit is contained in:
@ -292,14 +292,17 @@ func (cli *socketClient) FlushSync() error {
|
||||
return cli.Error()
|
||||
}
|
||||
|
||||
func (cli *socketClient) InfoSync() (types.Result, *types.TMSPInfo, *types.LastBlockInfo, *types.ConfigInfo) {
|
||||
func (cli *socketClient) InfoSync() (resInfo types.ResponseInfo, err error) {
|
||||
reqres := cli.queueRequest(types.ToRequestInfo())
|
||||
cli.FlushSync()
|
||||
if err := cli.Error(); err != nil {
|
||||
return types.ErrInternalError.SetLog(err.Error()), nil, nil, nil
|
||||
return resInfo, err
|
||||
}
|
||||
if resInfo_ := reqres.Response.GetInfo(); resInfo_ != nil {
|
||||
return *resInfo_, nil
|
||||
} else {
|
||||
return resInfo, nil
|
||||
}
|
||||
resp := reqres.Response.GetInfo()
|
||||
return types.Result{Code: OK, Data: []byte(resp.Info), Log: LOG}, resp.TmspInfo, resp.LastBlock, resp.Config
|
||||
}
|
||||
|
||||
func (cli *socketClient) SetOptionSync(key string, value string) (res types.Result) {
|
||||
|
Reference in New Issue
Block a user