"erigon snapshots retire" - doesn't see any files because version is 0 - fix (#9163)

This commit is contained in:
Alex Sharov 2024-01-08 18:30:51 +07:00 committed by GitHub
parent ff92b701c3
commit de6c1593e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,6 +87,7 @@ var snapshotCommand = cli.Command{
&SnapshotFromFlag,
&SnapshotToFlag,
&SnapshotEveryFlag,
&SnapshotVersionFlag,
}),
},
{
@ -510,6 +511,9 @@ func doRetireCommand(cliCtx *cli.Context) error {
to := cliCtx.Uint64(SnapshotToFlag.Name)
every := cliCtx.Uint64(SnapshotEveryFlag.Name)
version := uint8(cliCtx.Int(SnapshotVersionFlag.Name))
if version != 0 {
snapcfg.SnapshotVersion(version)
}
db := dbCfg(kv.ChainDB, dirs.Chaindata).MustOpen()
defer db.Close()