[#932] adm: Move const to package constants

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2024-02-02 15:26:57 +03:00
parent 814c411f4a
commit e2cee4cf09
29 changed files with 140 additions and 114 deletions

View file

@ -12,6 +12,7 @@ import (
"strings"
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/config"
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/constants"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring"
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
@ -27,7 +28,7 @@ func GetAlphabetWallets(v *viper.Viper, walletDir string) ([]*wallet.Wallet, err
return nil, err
}
if len(wallets) > MaxAlphabetNodes {
if len(wallets) > constants.MaxAlphabetNodes {
return nil, ErrTooManyAlphabetNodes
}
return wallets, nil
@ -161,7 +162,7 @@ func readContractsFromArchive(file io.Reader, names []string) (map[string]*Contr
}
func GetAlphabetNNSDomain(i int) string {
return AlphabetContract + strconv.FormatUint(uint64(i), 10) + ".frostfs"
return constants.AlphabetContract + strconv.FormatUint(uint64(i), 10) + ".frostfs"
}
func ParseGASAmount(s string) (fixedn.Fixed8, error) {