fix: allow app.SetSnapshotStore(nil) (#7507)

* fix: allow app.SetSnapshotStore(nil)

* fix: downgrade Error to Info in BaseApp.snapshot
This commit is contained in:
Michael FIG
2020-11-03 23:02:27 +01:00
committed by GitHub
parent ec285f1798
commit d96d79b8fb
2 changed files with 18 additions and 0 deletions
+4
View File
@@ -204,6 +204,10 @@ func (app *BaseApp) SetSnapshotStore(snapshotStore *snapshots.Store) {
if app.sealed {
panic("SetSnapshotStore() on sealed BaseApp")
}
if snapshotStore == nil {
app.snapshotManager = nil
return
}
app.snapshotManager = snapshots.NewManager(snapshotStore, app.cms)
}