Expose rootMultiStore query in BaseApp

This commit is contained in:
Ethan Frey
2018-02-06 17:20:29 -05:00
committed by Ethan Buchman
parent 44c39043f1
commit 8765fa32fa
+7 -2
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.