Skip to content

Commit 6c8d794

Browse files
committed
reorder mul/div
1 parent adad4fd commit 6c8d794

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pallets/subtensor/src/coinbase/run_coinbase.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,10 @@ impl<T: Config> Pallet<T> {
308308
}
309309

310310
// --- 11 Calculate this nominator's share of the emission.
311-
let nominator_emission: I64F64 = I64F64::from_num(emission_minus_take)
312-
.saturating_mul(I64F64::from_num(nominator_stake))
311+
let nominator_emission: I64F64 = I64F64::from_num(nominator_stake)
313312
.checked_div(I64F64::from_num(total_viable_nominator_stake))
314-
.unwrap_or(I64F64::from_num(0));
313+
.unwrap_or(I64F64::from_num(0))
314+
.saturating_mul(I64F64::from_num(emission_minus_take));
315315

316316
// --- 12 Increase the stake for the nominator.
317317
Self::increase_stake_on_coldkey_hotkey_account(

0 commit comments

Comments
 (0)