Skip to content

Commit 82c76be

Browse files
committed
fix: incorrect endHeight
1 parent 7ca9b67 commit 82c76be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/store/pruning.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ func (s *DefaultPruningStore) PruneBlockData(ctx context.Context) error {
117117
return nil
118118
}
119119

120-
// Must keep latest 2 blocks.
121-
endHeight := height - 1 - s.Config.KeepRecent
120+
// Must keep at least 2 blocks(while strategy is everything).
121+
endHeight := height - s.Config.KeepRecent
122122
startHeight := min(0, endHeight-s.Config.KeepRecent)
123123

124124
for i := startHeight; i <= endHeight; i++ {

0 commit comments

Comments
 (0)