diff --git a/CHANGELOG.md b/CHANGELOG.md index 14dc585950cc..79d1e2f58620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Features + +* [\#11124](https://github.com/cosmos/cosmos-sdk/pull/11124) Add `GetAllVersions` to application store + ### Bug Fixes * (store) [\#11117](https://github.com/cosmos/cosmos-sdk/pull/11117) Fix data race in store trace component diff --git a/store/iavl/store.go b/store/iavl/store.go index 29a4d9871139..4b15cf73ea19 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -143,6 +143,11 @@ func (st *Store) VersionExists(version int64) bool { return st.tree.VersionExists(version) } +// GetAllVersions returns all versions in the iavl tree +func (st *Store) GetAllVersions() []int { + return st.tree.(*iavl.MutableTree).AvailableVersions() +} + // Implements Store. func (st *Store) GetStoreType() types.StoreType { return types.StoreTypeIAVL