Remove duplicate flags (#9199)

This fixes the snapshot uploader start as flags have been moved to
default
This commit is contained in:
Mark Holt 2024-01-11 01:03:12 +00:00 committed by GitHub
parent f690301c03
commit 641f53e9d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,12 +94,13 @@ var snapshotCommand = cli.Command{
Name: "uploader",
Action: doUploaderCommand,
Usage: "run erigon in snapshot upload mode (no execution)",
Flags: uploaderCommandFlags([]cli.Flag{
&SnapshotVersionFlag,
&erigoncli.UploadLocationFlag,
&erigoncli.UploadFromFlag,
&erigoncli.FrozenBlockLimitFlag,
}),
Flags: joinFlags(erigoncli.DefaultFlags,
[]cli.Flag{
&SnapshotVersionFlag,
&erigoncli.UploadLocationFlag,
&erigoncli.UploadFromFlag,
&erigoncli.FrozenBlockLimitFlag,
}),
Before: func(context *cli.Context) error {
erigoncli.SyncLoopBreakAfterFlag.Value = "Senders"
erigoncli.SyncLoopBlockLimitFlag.Value = 100000
@ -645,14 +646,6 @@ func doRetireCommand(cliCtx *cli.Context) error {
return nil
}
func uploaderCommandFlags(flags []cli.Flag) []cli.Flag {
return joinFlags(erigoncli.DefaultFlags, flags, []cli.Flag{
&erigoncli.SyncLoopBreakAfterFlag,
&erigoncli.SyncLoopBlockLimitFlag,
&erigoncli.SyncLoopPruneLimitFlag,
})
}
func doUploaderCommand(cliCtx *cli.Context) error {
var logger log.Logger
var err error