Skip to content

Commit

Permalink
refactor(baseapp): fix tests (#16132)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored May 16, 2023
1 parent 6cd6152 commit 50150d1
Show file tree
Hide file tree
Showing 8 changed files with 537 additions and 545 deletions.
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

0 comments on commit 50150d1

Please sign in to comment.