|
@ -25,11 +25,11 @@ func (a ABCIApp) ABCIInfo() (*ctypes.ResultABCIInfo, error) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (a ABCIApp) ABCIQuery(path string, data data.Bytes) (*ctypes.ResultABCIQuery, error) { |
|
|
func (a ABCIApp) ABCIQuery(path string, data data.Bytes) (*ctypes.ResultABCIQuery, error) { |
|
|
return a.ABCIQueryWithOptions(path, data, client.DefaultABCIQueryOptions()) |
|
|
|
|
|
|
|
|
return a.ABCIQueryWithOptions(path, data, client.DefaultABCIQueryOptions) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (a ABCIApp) ABCIQueryWithOptions(path string, data data.Bytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) { |
|
|
func (a ABCIApp) ABCIQueryWithOptions(path string, data data.Bytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) { |
|
|
q := a.App.Query(abci.RequestQuery{data, path, opts.Height, opts.Prove}) |
|
|
|
|
|
|
|
|
q := a.App.Query(abci.RequestQuery{data, path, opts.Height, opts.Trusted}) |
|
|
return &ctypes.ResultABCIQuery{q.Result()}, nil |
|
|
return &ctypes.ResultABCIQuery{q.Result()}, nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -84,11 +84,11 @@ func (m ABCIMock) ABCIInfo() (*ctypes.ResultABCIInfo, error) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (m ABCIMock) ABCIQuery(path string, data data.Bytes) (*ctypes.ResultABCIQuery, error) { |
|
|
func (m ABCIMock) ABCIQuery(path string, data data.Bytes) (*ctypes.ResultABCIQuery, error) { |
|
|
return m.ABCIQueryWithOptions(path, data, client.DefaultABCIQueryOptions()) |
|
|
|
|
|
|
|
|
return m.ABCIQueryWithOptions(path, data, client.DefaultABCIQueryOptions) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (m ABCIMock) ABCIQueryWithOptions(path string, data data.Bytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) { |
|
|
func (m ABCIMock) ABCIQueryWithOptions(path string, data data.Bytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) { |
|
|
res, err := m.Query.GetResponse(QueryArgs{path, data, opts.Height, opts.Prove}) |
|
|
|
|
|
|
|
|
res, err := m.Query.GetResponse(QueryArgs{path, data, opts.Height, opts.Trusted}) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return nil, err |
|
|
return nil, err |
|
|
} |
|
|
} |
|
@ -139,10 +139,10 @@ func (r *ABCIRecorder) _assertABCIClient() client.ABCIClient { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type QueryArgs struct { |
|
|
type QueryArgs struct { |
|
|
Path string |
|
|
|
|
|
Data data.Bytes |
|
|
|
|
|
Height uint64 |
|
|
|
|
|
Prove bool |
|
|
|
|
|
|
|
|
Path string |
|
|
|
|
|
Data data.Bytes |
|
|
|
|
|
Height uint64 |
|
|
|
|
|
Trusted bool |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (r *ABCIRecorder) addCall(call Call) { |
|
|
func (r *ABCIRecorder) addCall(call Call) { |
|
@ -160,14 +160,14 @@ func (r *ABCIRecorder) ABCIInfo() (*ctypes.ResultABCIInfo, error) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (r *ABCIRecorder) ABCIQuery(path string, data data.Bytes) (*ctypes.ResultABCIQuery, error) { |
|
|
func (r *ABCIRecorder) ABCIQuery(path string, data data.Bytes) (*ctypes.ResultABCIQuery, error) { |
|
|
return r.ABCIQueryWithOptions(path, data, client.DefaultABCIQueryOptions()) |
|
|
|
|
|
|
|
|
return r.ABCIQueryWithOptions(path, data, client.DefaultABCIQueryOptions) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (r *ABCIRecorder) ABCIQueryWithOptions(path string, data data.Bytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) { |
|
|
func (r *ABCIRecorder) ABCIQueryWithOptions(path string, data data.Bytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) { |
|
|
res, err := r.Client.ABCIQueryWithOptions(path, data, opts) |
|
|
res, err := r.Client.ABCIQueryWithOptions(path, data, opts) |
|
|
r.addCall(Call{ |
|
|
r.addCall(Call{ |
|
|
Name: "abci_query", |
|
|
Name: "abci_query", |
|
|
Args: QueryArgs{path, data, opts.Height, opts.Prove}, |
|
|
|
|
|
|
|
|
Args: QueryArgs{path, data, opts.Height, opts.Trusted}, |
|
|
Response: res, |
|
|
Response: res, |
|
|
Error: err, |
|
|
Error: err, |
|
|
}) |
|
|
}) |
|
|