@@ -587,7 +587,8 @@ calculate_stake_vote_rewards( fd_exec_slot_ctx_t * slot_ct
587
587
fd_stake_reward_calculation_dlist_footprint () );
588
588
589
589
fd_stake_reward_calculation_dlist_new ( result -> stake_reward_calculation .stake_rewards );
590
- result -> stake_reward_calculation .stake_rewards_len = 0UL ;
590
+ result -> stake_reward_calculation .stake_rewards_len = 1UL ;
591
+ result -> stake_reward_calculation .stake_rewards_lengths [0 ] = 0 ;
591
592
592
593
/* Create the vote rewards map. This will be destroyed after the vote rewards have been distributed. */
593
594
ulong vote_account_cnt = fd_vote_info_pair_t_map_size ( temp_info -> vote_states_pool , temp_info -> vote_states_root );
@@ -756,6 +757,7 @@ hash_rewards_into_partitions( fd_exec_slot_ctx_t * slot_c
756
757
/* Move the stake reward to the partition's dlist */
757
758
fd_partitioned_stake_rewards_dlist_t * partition = & result -> partitioned_stake_rewards .partitions [ partition_index ];
758
759
fd_partitioned_stake_rewards_dlist_ele_push_tail ( partition , stake_reward , stake_reward_calculation -> pool );
760
+ result -> partitioned_stake_rewards .partitions_lengths [ partition_index ]++ ;
759
761
}
760
762
}
761
763
@@ -1016,6 +1018,7 @@ fd_distribute_partitioned_epoch_rewards( fd_exec_slot_ctx_t * slot_ctx,
1016
1018
1017
1019
if ( (height >=distribution_starting_block_height ) && (height < distribution_end_exclusive ) ) {
1018
1020
ulong partition_index = height - distribution_starting_block_height ;
1021
+ FD_LOG_WARNING (( "Distributing rewards for partition %lu" , partition_index ));
1019
1022
distribute_epoch_rewards_in_partition ( & status -> partitioned_stake_rewards .partitions [ partition_index ],
1020
1023
status -> partitioned_stake_rewards .pool ,
1021
1024
slot_ctx );
0 commit comments