Skip to content

Commit

Permalink
Improving efficiency and readability
Browse files Browse the repository at this point in the history
  • Loading branch information
pbukva committed Aug 2, 2023
1 parent cf47c4a commit 05ab82a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions client/pruning/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ func PruningCmd(appCreator servertypes.AppCreator) *cobra.Command {
return nil
}

pruningHeights := make([]int64, effectiveLastHeight)

for height := int64(0); height < effectiveLastHeight; height++ {
pruningHeights[height] = height + 1
lenPH := effectiveLastHeight + 1
pruningHeights := make([]int64, lenPH)
for height := int64(1); height < lenPH; height++ {
pruningHeights[height] = height
}
pruningHeights = pruningHeights[1:]

fmt.Printf(
"pruning heights start from %v, end at %v\n",
pruningHeights[0],
Expand Down

0 comments on commit 05ab82a

Please sign in to comment.