pub fn assert_can_edit_instructions(&self) -> Result<(), ProgramError> {
        if self.assert_is_draft_state().is_err() {
            return Err(GovernanceError::InvalidStateCannotEditTransactions.into());
        }

        // For security purposes only proposals with the reject option can have executable instructions
        if self.deny_vote_weight.is_none() {
            return Err(GovernanceError::ProposalIsNotExecutable.into());
        }

        Ok(())
    }
/// Checks if Instructions can be edited (inserted or removed) for the Proposal in the given state
/// It also asserts whether the Proposal is executable (has the reject option)
Checks if Instructions can be edited (inserted or removed) for the Proposal in the given state
It also asserts whether the Proposal is executable (has the reject option)
Checks if Instructions can be edited ( inserted or removed ) for the Proposal in the given state It also asserts whether the Proposal is executable ( has the reject option )
pub fn assert_can_edit_instructions(&self) -> Result<(), ProgramError> {
        if self.assert_is_draft_state().is_err() {
            return Err(GovernanceError::InvalidStateCannotEditTransactions.into());
        }
        // For security purposes only proposals with the reject option can have executable instructions
        if self.deny_vote_weight.is_none() {
            return Err(GovernanceError::ProposalIsNotExecutable.into());
        }
        Ok(())
    }
pub fn assert_can_edit_instructions ( & self ) -> Result < ( ) , ProgramError > { if self . assert_is_draft_state ( ) . is_err ( ) { return Err ( GovernanceError :: InvalidStateCannotEditTransactions . into ( ) ) ; } // For security purposes only proposals with the reject option can have executable instructions if self . deny_vote_weight . is_none ( ) { return Err ( GovernanceError :: ProposalIsNotExecutable . into ( ) ) ; } Ok ( ( ) ) }
Checks if Instructions can be edited (inserted or removed) for the Proposal in the given state
It also asserts whether the Proposal is executable (has the reject option)
Checks if Instructions can be edited ( inserted or removed ) for the Proposal in the given state It also asserts whether the Proposal is executable ( has the reject option )
&self
&self