Skip to content

Commit b852255

Browse files
committed
add logging to dividend dist
1 parent 12a0f71 commit b852255

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

pallets/subtensor/src/coinbase/run_coinbase.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,12 +519,27 @@ impl<T: Config> Pallet<T> {
519519
let childkey_take_proportion: I96F32 =
520520
I96F32::from_num(Self::get_childkey_take(hotkey, netuid))
521521
.saturating_div(I96F32::from_num(u16::MAX));
522+
log::debug!(
523+
"Childkey take proportion: {:?} for hotkey {:?}",
524+
childkey_take_proportion,
525+
hotkey
526+
);
522527
// NOTE: Only the validation emission should be split amongst parents.
523528

524529
// Reserve childkey take
525530
let child_emission_take: I96F32 =
526531
childkey_take_proportion.saturating_mul(I96F32::from_num(validating_emission));
527532
let remaining_emission: I96F32 = validating_emission.saturating_sub(child_emission_take);
533+
log::debug!(
534+
"Child emission take: {:?} for hotkey {:?}",
535+
child_emission_take,
536+
hotkey
537+
);
538+
log::debug!(
539+
"Remaining emission: {:?} for hotkey {:?}",
540+
remaining_emission,
541+
hotkey
542+
);
528543

529544
// Initialize variables to track emission distribution
530545
let mut to_parents: u64 = 0;
@@ -573,6 +588,12 @@ impl<T: Config> Pallet<T> {
573588
total_contribution = total_contribution.saturating_add(combined_contribution);
574589
// Store the parent's contributions for later use
575590
parent_contributions.push((parent.clone(), combined_contribution));
591+
log::debug!(
592+
"Parent contribution for hotkey {:?} from parent {:?}: {:?}",
593+
hotkey,
594+
parent,
595+
combined_contribution
596+
);
576597
}
577598

578599
// Distribute emission to parents based on their contributions.

0 commit comments

Comments
 (0)