Skip to content

Commit

Permalink
feat: add get all versions (backport #11124) (#11145)
Browse files Browse the repository at this point in the history
* feat: add get all versions (#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
mergify[bot] and tac0turtle authored Feb 9, 2022
1 parent b4aec81 commit 8c45da3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [v0.44.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.6) - 2022-02-02

### Features

* [\#11124](https://github.com/cosmos/cosmos-sdk/pull/11124) Add `GetAllVersions` to application store
### Bug Fixes

* (grpc) [\#10985](https://github.com/cosmos/cosmos-sdk/pull/10992) The `/cosmos/tx/v1beta1/txs/{hash}` endpoint returns a 404 when a tx does not exist.
Expand Down
5 changes: 5 additions & 0 deletions store/iavl/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c45da3

Please sign in to comment.