@@ -353,6 +353,7 @@ impl<T: Config> Pallet<T> {
353
353
if let Ok ( owner_coldkey) = SubnetOwner :: < T > :: try_get ( netuid) {
354
354
if let Ok ( owner_hotkey) = SubnetOwnerHotkey :: < T > :: try_get ( netuid) {
355
355
// Increase stake for owner hotkey and coldkey.
356
+ log:: debug!( "owner_hotkey: {:?} owner_coldkey: {:?}, owner_cut: {:?}" , owner_hotkey, owner_coldkey, owner_cut) ;
356
357
Self :: increase_stake_for_hotkey_and_coldkey_on_subnet (
357
358
& owner_hotkey,
358
359
& owner_coldkey,
@@ -365,6 +366,7 @@ impl<T: Config> Pallet<T> {
365
366
// Distribute mining incentives.
366
367
for ( hotkey, incentive) in incentives {
367
368
// Increase stake for miner.
369
+ log:: debug!( "incentives: hotkey: {:?}" , incentive) ;
368
370
Self :: increase_stake_for_hotkey_and_coldkey_on_subnet (
369
371
& hotkey. clone ( ) ,
370
372
& Owner :: < T > :: get ( hotkey. clone ( ) ) ,
@@ -376,21 +378,21 @@ impl<T: Config> Pallet<T> {
376
378
// Distribute alpha divs.
377
379
let _ = AlphaDividendsPerSubnet :: < T > :: clear_prefix ( netuid, u32:: MAX , None ) ;
378
380
for ( hotkey, mut alpha_divs) in alpha_dividends {
379
- log:: debug!( "hotkey: {:?} alpha_divs: {:?}" , hotkey, alpha_divs) ;
380
-
381
381
// Get take prop
382
382
let alpha_take: I96F32 =
383
383
Self :: get_hotkey_take_float ( & hotkey) . saturating_mul ( alpha_divs) ;
384
384
// Remove take prop from alpha_divs
385
385
alpha_divs = alpha_divs. saturating_sub ( alpha_take) ;
386
386
// Give the validator their take.
387
+ log:: debug!( "hotkey: {:?} alpha_take: {:?}" , hotkey, alpha_take) ;
387
388
Self :: increase_stake_for_hotkey_and_coldkey_on_subnet (
388
389
& hotkey,
389
390
& Owner :: < T > :: get ( hotkey. clone ( ) ) ,
390
391
netuid,
391
392
tou64 ! ( alpha_take) ,
392
393
) ;
393
394
// Give all other nominators.
395
+ log:: debug!( "hotkey: {:?} alpha_divs: {:?}" , hotkey, alpha_divs) ;
394
396
Self :: increase_stake_for_hotkey_on_subnet ( & hotkey. clone ( ) , netuid, tou64 ! ( alpha_divs) ) ;
395
397
// Record dividends for this hotkey.
396
398
AlphaDividendsPerSubnet :: < T > :: mutate ( netuid, hotkey. clone ( ) , |divs| {
@@ -401,19 +403,20 @@ impl<T: Config> Pallet<T> {
401
403
// Distribute root tao divs.
402
404
let _ = TaoDividendsPerSubnet :: < T > :: clear_prefix ( netuid, u32:: MAX , None ) ;
403
405
for ( hotkey, mut root_tao) in tao_dividends {
404
- log:: debug!( "hotkey: {:?} root_tao: {:?}" , hotkey, root_tao) ;
405
406
// Get take prop
406
407
let tao_take: I96F32 = Self :: get_hotkey_take_float ( & hotkey) . saturating_mul ( root_tao) ;
407
408
// Remove take prop from root_tao
408
409
root_tao = root_tao. saturating_sub ( tao_take) ;
409
410
// Give the validator their take.
411
+ log:: debug!( "hotkey: {:?} tao_take: {:?}" , hotkey, tao_take) ;
410
412
Self :: increase_stake_for_hotkey_and_coldkey_on_subnet (
411
413
& hotkey,
412
414
& Owner :: < T > :: get ( hotkey. clone ( ) ) ,
413
415
Self :: get_root_netuid ( ) ,
414
416
tou64 ! ( tao_take) ,
415
417
) ;
416
418
// Give rest to nominators.
419
+ log:: debug!( "hotkey: {:?} root_tao: {:?}" , hotkey, root_tao) ;
417
420
Self :: increase_stake_for_hotkey_on_subnet (
418
421
& hotkey,
419
422
Self :: get_root_netuid ( ) ,
0 commit comments