Skip to content

Commit

Permalink
Only update prune point when maybe pruning
Browse files Browse the repository at this point in the history
  • Loading branch information
hkalodner authored and joshuacolvin0 committed Oct 7, 2022
1 parent 8ce0d72 commit 86a7545
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/arb-rpc-node/cmd/arb-node/arb-node.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,10 @@ func startup() error {
}
}

if err := cmdhelp.UpdatePrunePoint(ctx, rollup, mon.Core); err != nil {
logger.Error().Err(err).Msg("error pruning database")
if config.Core.CheckpointPruningMode != "off" {
if err := cmdhelp.UpdatePrunePoint(ctx, rollup, mon.Core); err != nil {
logger.Error().Err(err).Msg("error pruning database")
}
}

var dataSigner func([]byte) ([]byte, error)
Expand Down Expand Up @@ -531,7 +533,7 @@ func startup() error {
}()
}

if config.Core.CheckpointPruningMode == "on" {
if config.Core.CheckpointPruningMode != "off" {
ticker := time.NewTicker(time.Minute)
go func() {
defer ticker.Stop()
Expand Down

0 comments on commit 86a7545

Please sign in to comment.