diff --git a/baseapp/abci.go b/baseapp/abci.go index 3ed9cf197..225a75b91 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -502,7 +502,7 @@ func (app *BaseApp) Commit() abci.ResponseCommit { } func (app *BaseApp) forceCompact(height int64) { - if app.forceCompactInterval <= 0 || (height > 0 && height%app.forceCompactInterval == 0) { + if app.forceCompactInterval > 0 && height > 0 && height%app.forceCompactInterval == 0 { app.logger.Debug("db force compact") err := app.db.ForceCompact(nil, nil) if err != nil {