fn do_vote(who: T::AccountId, ref_index: ReferendumIndex, vote: Vote) -> Result {
		ensure!(vote.multiplier() <= Self::max_lock_periods(), "vote has too great a strength");
		ensure!(Self::is_active_referendum(ref_index), "vote given for invalid referendum.");
		if !<VoteOf<T>>::exists(&(ref_index, who.clone())) {
			<VotersFor<T>>::mutate(ref_index, |voters| voters.push(who.clone()));
		}
		<VoteOf<T>>::insert(&(ref_index, who), vote);
		Ok(())
	}
/// Actually enact a vote, if legit.
Actually enact a vote, if legit.
Actually enact a vote if legit .
fn do_vote(who: T::AccountId, ref_index: ReferendumIndex, vote: Vote) -> Result {
		ensure!(vote.multiplier() <= Self::max_lock_periods(), "vote has too great a strength");
		ensure!(Self::is_active_referendum(ref_index), "vote given for invalid referendum.");
		if !<VoteOf<T>>::exists(&(ref_index, who.clone())) {
			<VotersFor<T>>::mutate(ref_index, |voters| voters.push(who.clone()));
		}
		<VoteOf<T>>::insert(&(ref_index, who), vote);
		Ok(())
	}
fn do_vote ( who : T :: AccountId , ref_index : ReferendumIndex , vote : Vote ) -> Result { ensure ! ( vote multiplier ( ) Self max_lock_periods ( ) " " ) ; ensure ! ( Self is_active_referendum ( ref_index ) " " ) ; if ! < VoteOf < T > > :: exists ( & ( ref_index , who . clone ( ) ) ) { < VotersFor < T > > :: mutate ( ref_index , | voters | voters . push ( who . clone ( ) ) ) ; } < VoteOf < T > > :: insert ( & ( ref_index , who ) , vote ) ; Ok ( ( ) ) }
Actually enact a vote, if legit.
Actually enact a vote if legit .
who
T::AccountId
ref_index
ReferendumIndex
vote
Vote
who
T::AccountId
ref_index
ReferendumIndex
vote
Vote