From 6d6630589eb5cd4a3cf99880d6001ddfa4d88b67 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Thu, 11 Apr 2024 17:50:25 +0200 Subject: [PATCH] sort store upgrades --- baseapp/options.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/baseapp/options.go b/baseapp/options.go index 8ba3ae431c9e..0e2b8caf1ce9 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -3,6 +3,7 @@ package baseapp import ( "fmt" "io" + "sort" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" @@ -293,6 +294,9 @@ func (sm StoreMigrations) ToStoreUpgrades() *storetypes.StoreUpgrades { deleted[i] = name i++ } + // sort them to ensure deterministic order + sort.Strings(added) + sort.Strings(deleted) return &storetypes.StoreUpgrades{ Added: added, Deleted: deleted,