Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(baseapp): fix tests #16132

Merged
merged 11 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (app *BaseApp) Query(_ context.Context, req *abci.RequestQuery) (resp *abci
resp = handleQueryApp(app, path, req)

case QueryPathStore:
resp = handleQueryStore(app, path, req)
resp = handleQueryStore(app, path, *req)

case QueryPathP2P:
resp = handleQueryP2P(app, path)
Expand Down Expand Up @@ -318,7 +318,7 @@ func (app *BaseApp) ApplySnapshotChunk(_ context.Context, req *abci.RequestApply
Result: abci.ResponseApplySnapshotChunk_RETRY,
RefetchChunks: []uint32{req.Index},
RejectSenders: []string{req.Sender},
}, err
}, nil

default:
app.logger.Error("failed to restore snapshot", "err", err)
Expand Down Expand Up @@ -865,7 +865,7 @@ func handleQueryApp(app *BaseApp, path []string, req *abci.RequestQuery) *abci.R
), app.trace)
}

func handleQueryStore(app *BaseApp, path []string, req *abci.RequestQuery) *abci.ResponseQuery {
func handleQueryStore(app *BaseApp, path []string, req abci.RequestQuery) *abci.ResponseQuery {
// "/store" prefix for store queries
queryable, ok := app.cms.(storetypes.Queryable)
if !ok {
Expand All @@ -885,7 +885,7 @@ func handleQueryStore(app *BaseApp, path []string, req *abci.RequestQuery) *abci
// TODO: Update Query interface method accept a pointer to RequestQuery.
//
// Ref: https://github.com/cosmos/cosmos-sdk/issues/12272
resp := queryable.Query(req)
resp := queryable.Query(&req)
resp.Height = req.Height

return resp
Expand Down
Loading