Skip to content

Commit

Permalink
fix use of erigon snapshots retire --from/to flags (#13872)
Browse files Browse the repository at this point in the history
From is always set to 0 and ignoring parameter;
To is checked in db if not given, but if its given, `forwardProgress` is
always 0.
  • Loading branch information
awskii authored Feb 21, 2025
1 parent 5bc9ca2 commit 99a4228
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion turbo/app/snapshots_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -1383,10 +1383,12 @@ func doRetireCommand(cliCtx *cli.Context, dirs datadir.Dirs) error {
if ok {
from, to, every = from2, to2, to2-from2
}
} else {
forwardProgress = to
}

logger.Info("Params", "from", from, "to", to, "every", every)
if err := br.RetireBlocks(ctx, 0, forwardProgress, log.LvlInfo, nil, nil, nil); err != nil {
if err := br.RetireBlocks(ctx, from, forwardProgress, log.LvlInfo, nil, nil, nil); err != nil {
return err
}

Expand Down

0 comments on commit 99a4228

Please sign in to comment.