pub fn finalize_vote(
        &mut self,
        governing_token_supply: u64,
        config: &GovernanceConfig,
        current_unix_timestamp: UnixTimestamp,
    ) -> Result<(), ProgramError> {
        self.assert_can_finalize_vote(config, current_unix_timestamp)?;

        self.state = self.get_final_vote_state(governing_token_supply, config);
        self.voting_completed_at = Some(current_unix_timestamp);

        Ok(())
    }
/// Finalizes vote by moving it to final state Succeeded or Defeated if max_voting_time has passed
/// If Proposal is still within max_voting_time period then error is returned
Finalizes vote by moving it to final state Succeeded or Defeated if max_voting_time has passed
If Proposal is still within max_voting_time period then error is returned
Finalizes vote by moving it to final state Succeeded or Defeated if max_voting_time has passed If Proposal is still within max_voting_time period then error is returned
pub fn finalize_vote(
        &mut self,
        governing_token_supply: u64,
        config: &GovernanceConfig,
        current_unix_timestamp: UnixTimestamp,
    ) -> Result<(), ProgramError> {
        self.assert_can_finalize_vote(config, current_unix_timestamp)?;
        self.state = self.get_final_vote_state(governing_token_supply, config);
        self.voting_completed_at = Some(current_unix_timestamp);
        Ok(())
    }
pub fn finalize_vote ( & mut self , governing_token_supply : u64 , config : & GovernanceConfig , current_unix_timestamp : UnixTimestamp , ) -> Result < ( ) , ProgramError > { self . assert_can_finalize_vote ( config , current_unix_timestamp ) ? ; self . state = self . get_final_vote_state ( governing_token_supply , config ) ; self . voting_completed_at = Some ( current_unix_timestamp ) ; Ok ( ( ) ) }
Finalizes vote by moving it to final state Succeeded or Defeated if max_voting_time has passed
If Proposal is still within max_voting_time period then error is returned
Finalizes vote by moving it to final state Succeeded or Defeated if max_voting_time has passed If Proposal is still within max_voting_time period then error is returned
&mut self
governing_token_supply
u64
config
&GovernanceConfig
current_unix_timestamp
UnixTimestamp
&mut self
governing_token_supply
u64
config
&GovernanceConfig
current_unix_timestamp
UnixTimestamp