forked from TrueCloudLab/frostfs-node
[#247] network_config: Drop reputation
Drop the code that was expected to work with global reputation network parameters. Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
parent
b453bb754c
commit
beabed788c
6 changed files with 0 additions and 60 deletions
|
@ -56,15 +56,12 @@ func dumpNetworkConfig(cmd *cobra.Command, _ []string) error {
|
|||
switch k {
|
||||
case netmap.AuditFeeConfig, netmap.BasicIncomeRateConfig,
|
||||
netmap.ContainerFeeConfig, netmap.ContainerAliasFeeConfig,
|
||||
netmap.EtIterationsConfig,
|
||||
netmap.EpochDurationConfig, netmap.IrCandidateFeeConfig,
|
||||
netmap.MaxObjectSizeConfig, netmap.WithdrawFeeConfig:
|
||||
nbuf := make([]byte, 8)
|
||||
copy(nbuf[:], v)
|
||||
n := binary.LittleEndian.Uint64(nbuf)
|
||||
_, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%d (int)\n", k, n)))
|
||||
case netmap.EtAlphaConfig:
|
||||
_, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%s (str)\n", k, v)))
|
||||
case netmap.HomomorphicHashingDisabledKey, netmap.MaintenanceModeAllowedConfig:
|
||||
if len(v) == 0 || len(v) > 1 {
|
||||
return invalidConfigValueErr(k)
|
||||
|
@ -139,22 +136,12 @@ func parseConfigPair(kvStr string, force bool) (key string, val any, err error)
|
|||
switch key {
|
||||
case netmap.AuditFeeConfig, netmap.BasicIncomeRateConfig,
|
||||
netmap.ContainerFeeConfig, netmap.ContainerAliasFeeConfig,
|
||||
netmap.EtIterationsConfig,
|
||||
netmap.EpochDurationConfig, netmap.IrCandidateFeeConfig,
|
||||
netmap.MaxObjectSizeConfig, netmap.WithdrawFeeConfig:
|
||||
val, err = strconv.ParseInt(valRaw, 10, 64)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("could not parse %s's value '%s' as int: %w", key, valRaw, err)
|
||||
}
|
||||
case netmap.EtAlphaConfig:
|
||||
// just check that it could
|
||||
// be parsed correctly
|
||||
_, err = strconv.ParseFloat(v, 64)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("could not parse %s's value '%s' as float: %w", key, valRaw, err)
|
||||
}
|
||||
|
||||
val = valRaw
|
||||
case netmap.HomomorphicHashingDisabledKey, netmap.MaintenanceModeAllowedConfig:
|
||||
val, err = strconv.ParseBool(valRaw)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue