adm: Fix dump-config output #1139
2 changed files with 10 additions and 1 deletions
|
@ -61,7 +61,9 @@ func dumpNetworkConfig(cmd *cobra.Command, _ []string) error {
|
||||||
case netmap.ContainerFeeConfig, netmap.ContainerAliasFeeConfig,
|
case netmap.ContainerFeeConfig, netmap.ContainerAliasFeeConfig,
|
||||||
netmap.EpochDurationConfig, netmap.IrCandidateFeeConfig,
|
netmap.EpochDurationConfig, netmap.IrCandidateFeeConfig,
|
||||||
netmap.MaxObjectSizeConfig, netmap.WithdrawFeeConfig,
|
netmap.MaxObjectSizeConfig, netmap.WithdrawFeeConfig,
|
||||||
netmap.MaxECDataCountConfig, netmap.MaxECParityCountConfig:
|
netmap.MaxECDataCountConfig, netmap.MaxECParityCountConfig,
|
||||||
fyrchik marked this conversation as resolved
|
|||||||
|
netmap.EigenTrustIterationsConfig, netmap.BasicIncomeRateConfig,
|
||||||
|
netmap.AuditFeeConfig:
|
||||||
nbuf := make([]byte, 8)
|
nbuf := make([]byte, 8)
|
||||||
copy(nbuf[:], v)
|
copy(nbuf[:], v)
|
||||||
n := binary.LittleEndian.Uint64(nbuf)
|
n := binary.LittleEndian.Uint64(nbuf)
|
||||||
|
@ -71,6 +73,9 @@ func dumpNetworkConfig(cmd *cobra.Command, _ []string) error {
|
||||||
return helper.InvalidConfigValueErr(k)
|
return helper.InvalidConfigValueErr(k)
|
||||||
}
|
}
|
||||||
_, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%t (bool)\n", k, v[0] == 1)))
|
_, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%t (bool)\n", k, v[0] == 1)))
|
||||||
|
case netmap.EigenTrustAlphaConfig:
|
||||||
|
res, _ := hex.DecodeString(hex.EncodeToString(v))
|
||||||
|
_, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%s (string)\n", k, res)))
|
||||||
default:
|
default:
|
||||||
_, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%s (hex)\n", k, hex.EncodeToString(v))))
|
_, _ = tw.Write([]byte(fmt.Sprintf("%s:\t%s (hex)\n", k, hex.EncodeToString(v))))
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,10 @@ const (
|
||||||
WithdrawFeeConfig = "WithdrawFee"
|
WithdrawFeeConfig = "WithdrawFee"
|
||||||
HomomorphicHashingDisabledKey = "HomomorphicHashingDisabled"
|
HomomorphicHashingDisabledKey = "HomomorphicHashingDisabled"
|
||||||
MaintenanceModeAllowedConfig = "MaintenanceModeAllowed"
|
MaintenanceModeAllowedConfig = "MaintenanceModeAllowed"
|
||||||
|
EigenTrustIterationsConfig = "EigenTrustIterations"
|
||||||
|
EigenTrustAlphaConfig = "EigenTrustAlpha"
|
||||||
|
BasicIncomeRateConfig = "BasicIncomeRate"
|
||||||
|
AuditFeeConfig = "AuditFee"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MaxObjectSize receives max object size configuration
|
// MaxObjectSize receives max object size configuration
|
||||||
|
|
Loading…
Reference in a new issue
The task was mostly about EC fields.
The others were intentionally deleted, as they are unused and thus are output in hex as the default format.
Then there is no problem to fix, closing PR.