Skip to content

Commit

Permalink
feat: add get all versions (backport cosmos#11124) (cosmos#11144)
Browse files Browse the repository at this point in the history
* feat: add get all versions (cosmos#11124)

* add get all versions

* add changelog entry

(cherry picked from commit d624a65)

# Conflicts:
#	CHANGELOG.md

* fix conflicts and remove interface break

Co-authored-by: Marko <marbar3778@yahoo.com>
  • Loading branch information
2 people authored and JeancarloBarrios committed Sep 28, 2024
1 parent 8c23c2c commit a7aeae2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,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
Expand Down
4 changes: 2 additions & 2 deletions store/iavl/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ func (st *Store) VersionExists(version int64) bool {

// GetAllVersions returns all versions in the iavl tree
func (st *Store) GetAllVersions() []int {
return st.tree.AvailableVersions()
return st.tree.(*iavl.MutableTree).AvailableVersions()
}

// GetStoreType implements Store.
// Implements Store.
func (st *Store) GetStoreType() types.StoreType {
return types.StoreTypeIAVL
}
Expand Down

0 comments on commit a7aeae2

Please sign in to comment.