From 6bf094bee2fff47016f76027f1c0a437b0389cf8 Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Sun, 26 Nov 2023 10:38:35 +0100 Subject: [PATCH] go/oasis-node: Remove obsolete db section during config migration --- .changelog/5473.bugfix.md | 1 + go/oasis-node/cmd/config/migrate/migrate.go | 3 +++ go/oasis-node/cmd/config/migrate/migrate_test.go | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 .changelog/5473.bugfix.md diff --git a/.changelog/5473.bugfix.md b/.changelog/5473.bugfix.md new file mode 100644 index 00000000000..16f943214c2 --- /dev/null +++ b/.changelog/5473.bugfix.md @@ -0,0 +1 @@ +go/oasis-node: Remove obsolete db section during config migration diff --git a/go/oasis-node/cmd/config/migrate/migrate.go b/go/oasis-node/cmd/config/migrate/migrate.go index ce72faf1ad4..283aec4042b 100644 --- a/go/oasis-node/cmd/config/migrate/migrate.go +++ b/go/oasis-node/cmd/config/migrate/migrate.go @@ -346,6 +346,9 @@ func doMigrateConfig(cmd *cobra.Command, args []string) { m(newCfg["consensus"])["prune"] = prune delete(m(m(tendermint)["abci"]), "prune") } + } else if k == "db" { + logger.Info("consensus.db.* is no longer needed") + delete(m(tendermint), "db") } else { m(newCfg["consensus"])[k] = v delete(m(tendermint), k) diff --git a/go/oasis-node/cmd/config/migrate/migrate_test.go b/go/oasis-node/cmd/config/migrate/migrate_test.go index 1a162b9a1ae..f4cc09c172d 100644 --- a/go/oasis-node/cmd/config/migrate/migrate_test.go +++ b/go/oasis-node/cmd/config/migrate/migrate_test.go @@ -120,6 +120,8 @@ consensus: upstream_address: - "asdf@1.2.3.4:5678" mode: full + db: + backend: badger # Validators behind sentry nodes should set sentries as persistent peers. p2p: