Skip to content

Commit 871e1a2

Browse files
committed
Merge branch 'hotfix/sub-root-divs' into devnet-ready
2 parents 280e3e8 + 956263f commit 871e1a2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pallets/subtensor/src/coinbase/run_coinbase.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,14 @@ impl<T: Config> Pallet<T> {
318318
let root_prop: I96F32 = root_alpha.checked_div(total_alpha).unwrap_or(zero);
319319
// Compute root dividends
320320
let root_divs: I96F32 = dividend.saturating_mul(root_prop);
321-
// Record the root dividends.
321+
// Compute alpha dividends
322+
let alpha_divs: I96F32 = dividend.saturating_sub(root_divs);
323+
// Record the alpha dividends.
322324
alpha_dividends
323325
.entry(hotkey.clone())
324-
.and_modify(|e| *e = e.saturating_add(dividend))
325-
.or_insert(dividend);
326-
// Record the alpha_dividends.
326+
.and_modify(|e| *e = e.saturating_add(alpha_divs))
327+
.or_insert(alpha_divs);
328+
// Record the root dividends.
327329
root_dividends
328330
.entry(hotkey.clone())
329331
.and_modify(|e| *e = e.saturating_add(root_divs))

0 commit comments

Comments
 (0)