Expose rootMultiStore query in BaseApp

This commit is contained in:
Ethan Frey 2018-01-30 20:01:25 +01:00 committed by Ethan Buchman
parent 44c39043f1
commit 8765fa32fa
1 changed files with 7 additions and 2 deletions

View File

@ -199,9 +199,14 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC
}
// Implements ABCI.
// Delegates to CommitMultiStore if it implements Queryable
func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery) {
// TODO: See app/query.go
return
query, ok := app.cms.(sdk.Queryable)
if !ok {
msg := "application doesn't support queries"
return sdk.ErrUnknownRequest(msg).Result().ToQuery()
}
return query.Query(req)
}
// Implements ABCI.