* 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:
parent
9bf8c9a971
commit
4161d2b602
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue