diff --git a/renter/price_tracker.go b/renter/price_tracker.go index cb1b4c2..44c3e73 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, ok := new(big.Rat).SetString(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice) - if !ok { - return errors.New("failed to parse max rpc price") + maxRPCPrice, err := newRat(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice, "max rpc price") + if err != nil { + return err } maxRPCPrice = ratDivide(maxRPCPrice, 1_000_000)