pub fn compute_operator_reward(state: &State, operator: &mut OperatorInfo) {
    operator.pending_rewards += Decimal256::from_uint256(operator.shares)
        * (state.operator_reward_emission_index.global_reward_index - operator.reward_index);
    operator.reward_index = state.operator_reward_emission_index.global_reward_index;
}
/// Compute reward amount an operator/referrer received
Compute reward amount an operator/referrer received
Compute reward amount an operator / referrer received
pub fn compute_operator_reward(state: &State, operator: &mut OperatorInfo) {
    operator.pending_rewards += Decimal256::from_uint256(operator.shares)
        * (state.operator_reward_emission_index.global_reward_index - operator.reward_index);
    operator.reward_index = state.operator_reward_emission_index.global_reward_index;
}
pub fn compute_operator_reward ( state : & State , operator : & mut OperatorInfo ) { operator . pending_rewards += Decimal256 :: from_uint256 ( operator . shares ) * ( state . operator_reward_emission_index . global_reward_index - operator . reward_index ) ; operator . reward_index = state . operator_reward_emission_index . global_reward_index ; }
Compute reward amount an operator/referrer received
Compute reward amount an operator / referrer received
state
&State
operator
&mut OperatorInfo
state
&State
operator
&mut OperatorInfo