pub fn update_reward_per_share(
        &mut self,
        current_block_number: BlockNumber,
        amount_per_share: BalanceOf,
    ) -> Result<(), ArithmeticError> {
        self.reward_per_share_stored =
            self.reward_per_share(current_block_number, amount_per_share)?;
        self.last_update_block = self.last_reward_block_applicable(current_block_number);

        Ok(())
    }
/// Update reward amount for one share of staking token and updating block.
/// Return ArithmeticError if it encounter an arithmetic error.
Update reward amount for one share of staking token and updating block.
Return ArithmeticError if it encounter an arithmetic error.
Update reward amount for one share of staking token and updating block . Return ArithmeticError if it encounter an arithmetic error .
pub fn update_reward_per_share(
        &mut self,
        current_block_number: BlockNumber,
        amount_per_share: BalanceOf,
    ) -> Result<(), ArithmeticError> {
        self.reward_per_share_stored =
            self.reward_per_share(current_block_number, amount_per_share)?;
        self.last_update_block = self.last_reward_block_applicable(current_block_number);
        Ok(())
    }
pub fn update_reward_per_share ( & mut self , current_block_number : BlockNumber , amount_per_share : BalanceOf , ) -> Result < ( ) , ArithmeticError > { self . reward_per_share_stored = self . reward_per_share ( current_block_number , amount_per_share ) ? ; self . last_update_block = self . last_reward_block_applicable ( current_block_number ) ; Ok ( ( ) ) }
Update reward amount for one share of staking token and updating block.
Update reward amount for one share of staking token and updating block .
&mut self
current_block_number
BlockNumber
amount_per_share
BalanceOf
&mut self
current_block_number
BlockNumber
amount_per_share
BalanceOf