Skip to content

Commit

Permalink
Fix prune AppState (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
baabeetaa authored Mar 4, 2023
1 parent 783d959 commit d2e8cef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/pruner.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,10 +761,10 @@ func pruneAppState(home string) error {

fmt.Println(len(v64))
versionsToPrune := int64(len(v64)) - 10
fmt.Printf("[pruneAppState] versionsToPrune=%d\n", versionsToPrune)
if versionsToPrune <= 0 {
fmt.Printf("[pruneAppState] No need to prune (%d)\n", versionsToPrune)
//return nil

} else {
appStore.PruneHeights = v64[:versionsToPrune]
appStore.PruneStores()
}
Expand Down
1 change: 1 addition & 0 deletions internal/rootmulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ type empty struct{}
func (rs *Store) PruneStores() {
PruneHeights := rs.PruneHeights
lenPruneheights := len(PruneHeights)
fmt.Printf("[PruneStores] lenPruneheights=(%d)\n", lenPruneheights)
if lenPruneheights == 0 {
return
}
Expand Down

0 comments on commit d2e8cef

Please sign in to comment.