Skip to content

Commit

Permalink
Merge branch 'master' into sunny/change-pubkey-adr
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnya97 authored Nov 24, 2020
2 parents b5442e1 + 12a02b9 commit dc9d36b
Show file tree
Hide file tree
Showing 146 changed files with 4,816 additions and 3,231 deletions.
10 changes: 5 additions & 5 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,11 @@ func (app *BaseApp) snapshot(height int64) {
func (app *BaseApp) Query(req abci.RequestQuery) abci.ResponseQuery {
defer telemetry.MeasureSince(time.Now(), "abci", "query")

// when a client did not provide a query height, manually inject the latest
if req.Height == 0 {
req.Height = app.LastBlockHeight()
}

// handle gRPC routes first rather than calling splitPath because '/' characters
// are used as part of gRPC paths
if grpcHandler := app.grpcQueryRouter.Route(req.Path); grpcHandler != nil {
Expand Down Expand Up @@ -742,11 +747,6 @@ func handleQueryStore(app *BaseApp, path []string, req abci.RequestQuery) abci.R

req.Path = "/" + strings.Join(path[1:], "/")

// when a client did not provide a query height, manually inject the latest
if req.Height == 0 {
req.Height = app.LastBlockHeight()
}

if req.Height <= 1 && req.Prove {
return sdkerrors.QueryResult(
sdkerrors.Wrap(
Expand Down
Loading

0 comments on commit dc9d36b

Please sign in to comment.