Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
qianbin committed Feb 6, 2024
1 parent d88c482 commit cd8398b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/thor/pruner/pruner.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (p *Pruner) loop(prune bool) error {
log.Info("pruner started")

const (
period = 50000 // the period to prune tries.
// period = 50000 // the period to prune tries.
reserved = 70000 // must be > thor.MaxStateHistory
)

Expand All @@ -81,6 +81,11 @@ func (p *Pruner) loop(prune bool) error {
}

for {
period := uint32(10000)
if int64(p.repo.BestBlockSummary().Header.Timestamp()) < time.Now().Unix()-30*24*3600 {
period = 50000
}

// select target
target := status.Base + period

Expand Down

0 comments on commit cd8398b

Please sign in to comment.