Skip to content

Commit

Permalink
sort store upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwaters committed Apr 11, 2024
1 parent c5a4e51 commit 6d66305
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions baseapp/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package baseapp
import (
"fmt"
"io"
"sort"

tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"
Expand Down Expand Up @@ -293,6 +294,9 @@ func (sm StoreMigrations) ToStoreUpgrades() *storetypes.StoreUpgrades {
deleted[i] = name
i++
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
// sort them to ensure deterministic order
sort.Strings(added)
sort.Strings(deleted)
return &storetypes.StoreUpgrades{
Added: added,
Deleted: deleted,
Expand Down

0 comments on commit 6d66305

Please sign in to comment.