pub fn compute_sponsor_reward(state: &State, sponsor: &mut SponsorInfo) {
    sponsor.pending_rewards += Decimal256::from_uint256(sponsor.lottery_deposit)
        * (state.sponsor_reward_emission_index.global_reward_index - sponsor.reward_index);
    sponsor.reward_index = state.sponsor_reward_emission_index.global_reward_index;
}
/// Compute reward amount a sponsor received
Compute reward amount a sponsor received
Compute reward amount a sponsor received
pub fn compute_sponsor_reward(state: &State, sponsor: &mut SponsorInfo) {
    sponsor.pending_rewards += Decimal256::from_uint256(sponsor.lottery_deposit)
        * (state.sponsor_reward_emission_index.global_reward_index - sponsor.reward_index);
    sponsor.reward_index = state.sponsor_reward_emission_index.global_reward_index;
}
pub fn compute_sponsor_reward ( state : & State , sponsor : & mut SponsorInfo ) { sponsor . pending_rewards += Decimal256 :: from_uint256 ( sponsor . lottery_deposit ) * ( state . sponsor_reward_emission_index . global_reward_index - sponsor . reward_index ) ; sponsor . reward_index = state . sponsor_reward_emission_index . global_reward_index ; }
Compute reward amount a sponsor received
Compute reward amount a sponsor received
state
&State
sponsor
&mut SponsorInfo
state
&State
sponsor
&mut SponsorInfo