aboutsummaryrefslogtreecommitdiffstats
path: root/swarm
diff options
context:
space:
mode:
authorFerenc Szabo <frncmx@gmail.com>2018-11-20 15:30:38 +0800
committerViktor TrĂ³n <viktor.tron@gmail.com>2018-11-20 15:30:38 +0800
commitd876f214e5500962d6acc1f99a6f2f7c5f63db8b (patch)
tree448a261413dedaea9cd66db15315a983257c5ea1 /swarm
parent7bf7bd2f5088d8abb21daef42b8dfce27b194bc7 (diff)
downloadgo-tangerine-d876f214e5500962d6acc1f99a6f2f7c5f63db8b.tar
go-tangerine-d876f214e5500962d6acc1f99a6f2f7c5f63db8b.tar.gz
go-tangerine-d876f214e5500962d6acc1f99a6f2f7c5f63db8b.tar.bz2
go-tangerine-d876f214e5500962d6acc1f99a6f2f7c5f63db8b.tar.lz
go-tangerine-d876f214e5500962d6acc1f99a6f2f7c5f63db8b.tar.xz
go-tangerine-d876f214e5500962d6acc1f99a6f2f7c5f63db8b.tar.zst
go-tangerine-d876f214e5500962d6acc1f99a6f2f7c5f63db8b.zip
swarm/storage: move 'running migrations for' log line (#18120)
So that we only see the log message when we actually have to migrate.
Diffstat (limited to 'swarm')
-rw-r--r--swarm/storage/localstore.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/swarm/storage/localstore.go b/swarm/storage/localstore.go
index fa98848dd..111821ff6 100644
--- a/swarm/storage/localstore.go
+++ b/swarm/storage/localstore.go
@@ -194,7 +194,8 @@ func (ls *LocalStore) Close() {
ls.DbStore.Close()
}
-// Migrate checks the datastore schema vs the runtime schema, and runs migrations if they don't match
+// Migrate checks the datastore schema vs the runtime schema and runs
+// migrations if they don't match
func (ls *LocalStore) Migrate() error {
actualDbSchema, err := ls.DbStore.GetSchema()
if err != nil {
@@ -202,12 +203,12 @@ func (ls *LocalStore) Migrate() error {
return err
}
- log.Debug("running migrations for", "schema", actualDbSchema, "runtime-schema", CurrentDbSchema)
-
if actualDbSchema == CurrentDbSchema {
return nil
}
+ log.Debug("running migrations for", "schema", actualDbSchema, "runtime-schema", CurrentDbSchema)
+
if actualDbSchema == DbSchemaNone {
ls.migrateFromNoneToPurity()
actualDbSchema = DbSchemaPurity