From 20a273a0dd465e97a916b06417d294033545ed1d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 10 Mar 2024 14:50:25 -0400 Subject: [PATCH] refactor: change maxStoragePrice math for readability --- renter/price_tracker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renter/price_tracker.go b/renter/price_tracker.go index 7c64a7b..f314049 100644 --- a/renter/price_tracker.go +++ b/renter/price_tracker.go @@ -149,9 +149,10 @@ SELECT AVG(rate) as average_rate FROM ( 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 / units.TiB + maxStoragePrice = maxStoragePrice / averageRate p.logger.Debug("Setting max storage price", zap.Float64("maxStoragePrice", maxStoragePrice))