Expose rootMultiStore query in BaseApp
This commit is contained in:
parent
44c39043f1
commit
8765fa32fa
|
@ -199,9 +199,14 @@ func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitC
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implements ABCI.
|
// Implements ABCI.
|
||||||
|
// Delegates to CommitMultiStore if it implements Queryable
|
||||||
func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery) {
|
func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery) {
|
||||||
// TODO: See app/query.go
|
query, ok := app.cms.(sdk.Queryable)
|
||||||
return
|
if !ok {
|
||||||
|
msg := "application doesn't support queries"
|
||||||
|
return sdk.ErrUnknownRequest(msg).Result().ToQuery()
|
||||||
|
}
|
||||||
|
return query.Query(req)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Implements ABCI.
|
// Implements ABCI.
|
||||||
|
|
Loading…
Reference in New Issue