fix: dont compute by rate the max rpc price

This commit is contained in:
Derrick Hammer 2024-03-11 08:01:56 -04:00
parent 944cb868b5
commit 96ec3b8501
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

@ -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)