Skip to content

Commit e83c867

Browse files
committed
Clarify intent behind hash length check
1 parent 94365b2 commit e83c867

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/pruner.go

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ func PruneAppState(dataDir string) error {
4444
}
4545

4646
for _, storeInfo := range cInfo.StoreInfos {
47+
// we only want to prune the stores with actual data.
48+
// sometimes in-memory stores get leaked to disk without data.
49+
// if that happens, the store's computed hash is empty as well.
4750
if len(storeInfo.CommitId.Hash) > 0 {
4851
storeNames = append(storeNames, storeInfo.Name)
4952
} else {

0 commit comments

Comments
 (0)