We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ca9b67 commit 82c76beCopy full SHA for 82c76be
1 file changed
pkg/store/pruning.go
@@ -117,8 +117,8 @@ func (s *DefaultPruningStore) PruneBlockData(ctx context.Context) error {
117
return nil
118
}
119
120
- // Must keep latest 2 blocks.
121
- endHeight := height - 1 - s.Config.KeepRecent
+ // Must keep at least 2 blocks(while strategy is everything).
+ endHeight := height - s.Config.KeepRecent
122
startHeight := min(0, endHeight-s.Config.KeepRecent)
123
124
for i := startHeight; i <= endHeight; i++ {
0 commit comments