Skip to content

Commit

Permalink
Add log for serving from iavl v SS
Browse files Browse the repository at this point in the history
  • Loading branch information
Kbhat1 committed Oct 17, 2024
1 parent ca29513 commit 41d045e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,10 @@ func (app *BaseApp) CreateQueryContext(height int64, prove bool) (sdk.Context, e
var cacheMS types.CacheMultiStore
if height < app.migrationHeight && app.qms != nil {
cacheMS, err = app.qms.CacheMultiStoreWithVersion(height)
app.logger.Info("SeiDB Archive Migration: Serving Query From Iavl", "height", height)
} else {
cacheMS, err = app.cms.CacheMultiStoreWithVersion(height)
app.logger.Info("SeiDB Archive Migration: Serving Query From State Store", "height", height)
}

if err != nil {
Expand Down Expand Up @@ -912,7 +914,6 @@ func handleQueryApp(app *BaseApp, path []string, req abci.RequestQuery) abci.Res
}

func handleQueryStore(app *BaseApp, path []string, req abci.RequestQuery) abci.ResponseQuery {

var (
queryable sdk.Queryable
ok bool
Expand All @@ -923,11 +924,13 @@ func handleQueryStore(app *BaseApp, path []string, req abci.RequestQuery) abci.R
if !ok {
return sdkerrors.QueryResultWithDebug(sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "multistore doesn't support queries"), app.trace)
}
app.logger.Info("SeiDB Archive Migration: Serving Query From Iavl", "height", req.Height)
} else {
queryable, ok = app.cms.(sdk.Queryable)
if !ok {
return sdkerrors.QueryResultWithDebug(sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "multistore doesn't support queries"), app.trace)
}
app.logger.Info("SeiDB Archive Migration: Serving Query From State Store", "height", req.Height)
}

// "/store" prefix for store queries
Expand Down

0 comments on commit 41d045e

Please sign in to comment.