refactor: change maxStoragePrice math for readability

This commit is contained in:
Derrick Hammer 2024-03-10 14:50:25 -04:00
parent d628ede1ee
commit 20a273a0dd
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -149,9 +149,10 @@ SELECT AVG(rate) as average_rate FROM (
return err return err
} }
maxStoragePrice := p.config.Config().Core.Storage.Sia.MaxStoragePrice / averageRate maxStoragePrice := p.config.Config().Core.Storage.Sia.MaxStoragePrice
maxStoragePrice = maxStoragePrice / redundancy.Redundancy() maxStoragePrice = maxStoragePrice / redundancy.Redundancy()
maxStoragePrice = maxStoragePrice / units.TiB maxStoragePrice = maxStoragePrice / units.TiB
maxStoragePrice = maxStoragePrice / averageRate
p.logger.Debug("Setting max storage price", zap.Float64("maxStoragePrice", maxStoragePrice)) p.logger.Debug("Setting max storage price", zap.Float64("maxStoragePrice", maxStoragePrice))