feat: add get all versions (backport #11124) (#11144)

* feat: add get all versions (#11124)

* add get all versions

* add changelog entry

(cherry picked from commit d624a65679)

# Conflicts:
#	CHANGELOG.md

* fix conflicts and remove interface break

Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
mergify[bot] 2022-02-09 10:08:36 +01:00 committed by GitHub
parent 9bf8c9a971
commit 4161d2b602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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