refactor: switch to using newRat
This commit is contained in:
parent
19afa09c4d
commit
7d87ed6ad7
|
@ -151,9 +151,9 @@ SELECT AVG(rate) as average_rate FROM (
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
maxRPCPrice, ok := new(big.Rat).SetString(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice)
|
maxRPCPrice, err := newRat(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice, "max rpc price")
|
||||||
if !ok {
|
if err != nil {
|
||||||
return errors.New("failed to parse max rpc price")
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
maxRPCPrice = ratDivide(maxRPCPrice, 1_000_000)
|
maxRPCPrice = ratDivide(maxRPCPrice, 1_000_000)
|
||||||
|
|
Loading…
Reference in New Issue