From 96ec3b85010b0b63949858e211917b6e8e923f81 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 11 Mar 2024 08:01:56 -0400 Subject: [PATCH] fix: dont compute by rate the max rpc price --- renter/price_tracker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renter/price_tracker.go b/renter/price_tracker.go index 16280a0..0096045 100644 --- a/renter/price_tracker.go +++ b/renter/price_tracker.go @@ -151,9 +151,9 @@ SELECT AVG(rate) as average_rate FROM ( return err } - maxRPCPrice, err := computeByRate(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice, averageRate, "max rpc price") - if err != nil { - return err + maxRPCPrice, ok := new(big.Rat).SetString(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice) + if !ok { + return errors.New("failed to parse max rpc price") } maxRPCPrice = ratDivide(maxRPCPrice, 1_000_000)