Skip to content

Commit de9c54a

Browse files
author
Samuel Dare
committed
lint
1 parent adce61b commit de9c54a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pallets/subtensor/src/epoch.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -845,12 +845,14 @@ impl<T: Config> Pallet<T> {
845845

846846
// Calculate the slope 'a' of the logistic function.
847847
// a = (ln((1 / alpha_high - 1)) - ln((1 / alpha_low - 1))) / (consensus_low - consensus_high)
848-
let a =
849-
(safe_ln((I32F32::from_num(1.0).saturating_div( alpha_high)).saturating_sub(I32F32::from_num(1.0)))
850-
.saturating_sub(safe_ln(
851-
(I32F32::from_num(1.0).saturating_div( alpha_low)).saturating_sub(I32F32::from_num(1.0)),
852-
)))
853-
.saturating_div(consensus_low.saturating_sub(consensus_high));
848+
let a = (safe_ln(
849+
(I32F32::from_num(1.0).saturating_div(alpha_high))
850+
.saturating_sub(I32F32::from_num(1.0)),
851+
)
852+
.saturating_sub(safe_ln(
853+
(I32F32::from_num(1.0).saturating_div(alpha_low)).saturating_sub(I32F32::from_num(1.0)),
854+
)))
855+
.saturating_div(consensus_low.saturating_sub(consensus_high));
854856
log::trace!("a: {:?}", a);
855857

856858
// Calculate the intercept 'b' of the logistic function.

0 commit comments

Comments
 (0)