@@ -1279,9 +1279,6 @@ pub mod pallet {
12791279 // we could just divide both numbers by 1000000000000000000, so we'd have say 5000 and 1 instead,
12801280 // since we're just using these values to get a multiplier output.
12811281
1282- println ! ( "000 {:?}" , rewards_allowance_dhx_daily_u128) ;
1283- println ! ( "001 {:?}" , rewards_aggregated_dhx_daily_as_u128) ;
1284-
12851282 let mut manageable_rewards_allowance_dhx_daily_u128 = 0u128 ;
12861283 if let Some ( _manageable_rewards_allowance_dhx_daily_u128) =
12871284 rewards_allowance_dhx_daily_u128. clone ( ) . checked_div ( 1000000000000000000u128 ) {
@@ -1333,7 +1330,7 @@ pub mod pallet {
13331330 }
13341331 }
13351332 log:: info!( "distribution_multiplier_for_day_fixed128 {:#?}" , distribution_multiplier_for_day_fixed128) ;
1336- println ! ( "[multiplier] block: {:#?}, miner: {:#?}, date_start: {:#?} distribution_multiplier_for_day_fixed128: {:#?}" , _n, miner_count, start_of_requested_date_millis, distribution_multiplier_for_day_fixed128) ;
1333+ // println!("[multiplier] block: {:#?}, miner: {:#?}, date_start: {:#?} distribution_multiplier_for_day_fixed128: {:#?}", _n, miner_count, start_of_requested_date_millis, distribution_multiplier_for_day_fixed128);
13371334
13381335 // Initialise outside the loop as we need this value after the loop after we finish iterating through all the miners
13391336 let mut rewards_allowance_dhx_remaining_today_as_u128 = 0u128 ;
@@ -1379,7 +1376,6 @@ pub mod pallet {
13791376 continue ;
13801377 }
13811378 log:: info!( "daily_reward_for_miner_as_u128: {:?}" , daily_reward_for_miner_as_u128. clone( ) ) ;
1382- println ! ( "0 {:?}" , daily_reward_for_miner_as_u128) ;
13831379
13841380 let mut manageable_daily_reward_for_miner_as_u128 = 0u128 ;
13851381 if let Some ( _manageable_daily_reward_for_miner_as_u128) =
@@ -1389,7 +1385,6 @@ pub mod pallet {
13891385 log:: error!( "Unable to divide daily_reward_for_miner_as_u128 to make it smaller" ) ;
13901386 return 0 ;
13911387 }
1392- println ! ( "1 {:?}" , manageable_daily_reward_for_miner_as_u128) ;
13931388
13941389 // Multiply, handling overflow
13951390 // TODO - probably have to initialise below proportion_of_daily_reward_for_miner_fixed128 to 0u128,
@@ -1409,7 +1404,7 @@ pub mod pallet {
14091404 }
14101405 }
14111406 log:: info!( "proportion_of_daily_reward_for_miner_fixed128: {:?}" , proportion_of_daily_reward_for_miner_fixed128. clone( ) ) ;
1412- println ! ( "2 {:?}" , proportion_of_daily_reward_for_miner_fixed128 ) ;
1407+
14131408 // round down to nearest integer. we need to round down, because if we round up then if there are
14141409 // 3x registered miners with 5000 DHX rewards allowance per day then they would each get 1667 rewards,
14151410 // but there would only be 1666 remaining after the first two, so the last one would miss out.
@@ -1426,7 +1421,7 @@ pub mod pallet {
14261421 return 0 ;
14271422 }
14281423
1429- println ! ( "[rewards] block: {:#?}, miner: {:#?}, date_start: {:#?} restored_proportion_of_daily_reward_for_miner_u128: {:#?}" , _n, miner_count, start_of_requested_date_millis, restored_proportion_of_daily_reward_for_miner_u128) ;
1424+ // println!("[rewards] block: {:#?}, miner: {:#?}, date_start: {:#?} restored_proportion_of_daily_reward_for_miner_u128: {:#?}", _n, miner_count, start_of_requested_date_millis, restored_proportion_of_daily_reward_for_miner_u128);
14301425
14311426 let treasury_account_id: T :: AccountId = <pallet_treasury:: Pallet < T > >:: account_id ( ) ;
14321427 let max_payout = pallet_balances:: Pallet :: < T > :: usable_balance ( treasury_account_id. clone ( ) ) ;
@@ -1474,8 +1469,8 @@ pub mod pallet {
14741469 return 0 ;
14751470 }
14761471
1477- println ! ( "[prepared-for-payment] block: {:#?}, miner: {:#?}, date_start: {:#?} max payout: {:#?}, rewards remaining today {:?}, restored_proportion_of_daily_reward_for_miner_u128 {:?}" ,
1478- _n, miner_count, start_of_requested_date_millis, max_payout_as_u128, rewards_allowance_dhx_remaining_today_as_u128, restored_proportion_of_daily_reward_for_miner_u128) ;
1472+ // println!("[prepared-for-payment] block: {:#?}, miner: {:#?}, date_start: {:#?} max payout: {:#?}, rewards remaining today {:?}, restored_proportion_of_daily_reward_for_miner_u128 {:?}",
1473+ // _n, miner_count, start_of_requested_date_millis, max_payout_as_u128, rewards_allowance_dhx_remaining_today_as_u128, restored_proportion_of_daily_reward_for_miner_u128);
14791474
14801475 // check if miner's reward is less than or equal to: rewards_allowance_dhx_daily_remaining
14811476 if restored_proportion_of_daily_reward_for_miner_u128. clone ( ) > 0u128 &&
@@ -1539,7 +1534,7 @@ pub mod pallet {
15391534 new_rewards_allowance_dhx_remaining_today. clone ( ) ,
15401535 ) ;
15411536
1542- println ! ( "[paid] block: {:#?}, miner: {:#?}, date_start: {:#?} new_rewards_allowance_dhx_remaining_today: {:#?}" , _n, miner_count, start_of_requested_date_millis, new_rewards_allowance_dhx_remaining_today) ;
1537+ // println!("[paid] block: {:#?}, miner: {:#?}, date_start: {:#?} new_rewards_allowance_dhx_remaining_today: {:#?}", _n, miner_count, start_of_requested_date_millis, new_rewards_allowance_dhx_remaining_today);
15431538
15441539 // emit event with reward payment history rather than bloating storage
15451540 Self :: deposit_event ( Event :: TransferredRewardsAllowanceDHXToMinerForDate (
0 commit comments