From 3bbc0aaed7d3270d5aaecd86d950aca33a5cecfb Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 7 Jun 2023 23:41:30 +0000 Subject: [PATCH] fix: StateSync Restore by excluding memory store (backport #16449) (#16452) Co-authored-by: Chill Validation <92176880+chillyvee@users.noreply.github.com> Co-authored-by: Julien Robert --- CHANGELOG.md | 1 + store/rootmulti/store.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d3757441062..bab7f0ec79d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes * (server) [#16395](https://github.com/cosmos/cosmos-sdk/pull/16395) Do not override some Comet config is purposely set differently in `InterceptConfigsPreRunHandler`. +* (store) [#16449](https://github.com/cosmos/cosmos-sdk/pull/16449) Fix StateSync Restore by excluding memory store. * (cli) [#16312](https://github.com/cosmos/cosmos-sdk/pull/16312) Allow any addresses in `client.ValidatePromptAddress`. * (x/group) [#16017](https://github.com/cosmos/cosmos-sdk/pull/16017) Correctly apply account number in group v2 migration. diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index ae9e5cff7ec0..79865502a33c 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -996,7 +996,8 @@ func (rs *Store) buildCommitInfo(version int64) *types.CommitInfo { storeInfos := []types.StoreInfo{} for _, key := range keys { store := rs.stores[key] - if store.GetStoreType() == types.StoreTypeTransient { + storeType := store.GetStoreType() + if storeType == types.StoreTypeTransient || storeType == types.StoreTypeMemory { continue } storeInfos = append(storeInfos, types.StoreInfo{