[#248] morph: Remove obsolete network parameters

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-08-03 14:20:09 +03:00 committed by Evgenii Stratonikov
parent c54fcb297d
commit 55ce4dc075

View file

@ -11,8 +11,6 @@ import (
const (
MaxObjectSizeConfig = "MaxObjectSize"
BasicIncomeRateConfig = "BasicIncomeRate"
AuditFeeConfig = "AuditFee"
EpochDurationConfig = "EpochDuration"
ContainerFeeConfig = "ContainerFee"
ContainerAliasFeeConfig = "ContainerAliasFee"
@ -33,28 +31,6 @@ func (c *Client) MaxObjectSize() (uint64, error) {
return objectSize, nil
}
// BasicIncomeRate returns basic income rate configuration value from network
// config in netmap contract.
func (c *Client) BasicIncomeRate() (uint64, error) {
rate, err := c.readUInt64Config(BasicIncomeRateConfig)
if err != nil {
return 0, fmt.Errorf("(%T) could not get basic income rate: %w", c, err)
}
return rate, nil
}
// AuditFee returns audit fee configuration value from network
// config in netmap contract.
func (c *Client) AuditFee() (uint64, error) {
fee, err := c.readUInt64Config(AuditFeeConfig)
if err != nil {
return 0, fmt.Errorf("(%T) could not get audit fee: %w", c, err)
}
return fee, nil
}
// EpochDuration returns number of sidechain blocks per one FrostFS epoch.
func (c *Client) EpochDuration() (uint64, error) {
epochDuration, err := c.readUInt64Config(EpochDurationConfig)
@ -201,10 +177,6 @@ type RawNetworkParameter struct {
type NetworkConfiguration struct {
MaxObjectSize uint64
StoragePrice uint64
AuditFee uint64
EpochDuration uint64
ContainerFee uint64
@ -262,10 +234,6 @@ func (c *Client) ReadNetworkConfiguration() (NetworkConfiguration, error) {
})
case MaxObjectSizeConfig:
res.MaxObjectSize = bytesToUint64(value)
case BasicIncomeRateConfig:
res.StoragePrice = bytesToUint64(value)
case AuditFeeConfig:
res.AuditFee = bytesToUint64(value)
case EpochDurationConfig:
res.EpochDuration = bytesToUint64(value)
case ContainerFeeConfig: