forked from TrueCloudLab/frostfs-node
[#1409] adm: Uncommonize DeltaFlag
It is used only in `force-new-epoch`, it is not _common_ between multiple commands. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
f45e75e3eb
commit
62028cd7ee
3 changed files with 4 additions and 4 deletions
|
@ -39,5 +39,4 @@ const (
|
|||
CustomZoneFlag = "domain"
|
||||
AlphabetSizeFlag = "size"
|
||||
AllFlag = "all"
|
||||
DeltaFlag = "delta"
|
||||
)
|
||||
|
|
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/commonflags"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/helper"
|
||||
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||
|
@ -13,6 +12,8 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
const deltaFlag = "delta"
|
||||
|
||||
func ForceNewEpochCmd(cmd *cobra.Command, _ []string) error {
|
||||
wCtx, err := helper.NewInitializeContext(cmd, viper.GetViper())
|
||||
if err != nil {
|
||||
|
@ -31,7 +32,7 @@ func ForceNewEpochCmd(cmd *cobra.Command, _ []string) error {
|
|||
}
|
||||
|
||||
bw := io.NewBufBinWriter()
|
||||
delta, _ := cmd.Flags().GetInt64(commonflags.DeltaFlag)
|
||||
delta, _ := cmd.Flags().GetInt64(deltaFlag)
|
||||
if err := helper.EmitNewEpochCall(bw, wCtx, nmHash, delta); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ func initForceNewEpochCmd() {
|
|||
ForceNewEpoch.Flags().String(commonflags.AlphabetWalletsFlag, "", commonflags.AlphabetWalletsFlagDesc)
|
||||
ForceNewEpoch.Flags().StringP(commonflags.EndpointFlag, commonflags.EndpointFlagShort, "", commonflags.EndpointFlagDesc)
|
||||
ForceNewEpoch.Flags().String(commonflags.LocalDumpFlag, "", "Path to the blocks dump file")
|
||||
ForceNewEpoch.Flags().Int64(commonflags.DeltaFlag, 1, "Number of epochs to increase the current epoch")
|
||||
ForceNewEpoch.Flags().Int64(deltaFlag, 1, "Number of epochs to increase the current epoch")
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
Loading…
Reference in a new issue