Skip to content

Commit

Permalink
fix(store/v2): don't delete future version when calling LoadVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Nov 28, 2024
1 parent 9caec06 commit c379dcf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion store/v2/commitment/iavl/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ func (t *IavlTree) WorkingHash() []byte {

// LoadVersion loads the state at the given version.
func (t *IavlTree) LoadVersion(version uint64) error {
return t.tree.LoadVersionForOverwriting(int64(version))
_, err := t.tree.LoadVersion(int64(version))
return err
}

// Commit commits the current state to the tree.
Expand Down

0 comments on commit c379dcf

Please sign in to comment.