fn tally_delegation(ref_index: ReferendumIndex) -> (BalanceOf<T>, BalanceOf<T>, BalanceOf<T>) {
		Self::voters_for(ref_index).iter()
			.fold((Zero::zero(), Zero::zero(), Zero::zero()), |(approve_acc, against_acc, capital_acc), voter| {
				let vote = Self::vote_of((ref_index, voter.clone()));
				let (votes, balance) = Self::delegated_votes(
					ref_index,
					voter.clone(),
					vote.multiplier(),
					MAX_RECURSION_LIMIT
				);
				if vote.is_aye() {
					(approve_acc + votes, against_acc, capital_acc + balance)
				} else {
					(approve_acc, against_acc + votes, capital_acc + balance)
				}
			})
	}
/// Get the delegated voters for the current proposal.
/// May go into a worker once https://github.com/paritytech/substrate/issues/1458 is done.
Get the delegated voters for the current proposal.
Get the delegated voters for the current proposal .
fn tally_delegation(ref_index: ReferendumIndex) -> (BalanceOf<T>, BalanceOf<T>, BalanceOf<T>) {
		Self::voters_for(ref_index).iter()
			.fold((Zero::zero(), Zero::zero(), Zero::zero()), |(approve_acc, against_acc, capital_acc), voter| {
				let vote = Self::vote_of((ref_index, voter.clone()));
				let (votes, balance) = Self::delegated_votes(
					ref_index,
					voter.clone(),
					vote.multiplier(),
					MAX_RECURSION_LIMIT
				);
				if vote.is_aye() {
					(approve_acc + votes, against_acc, capital_acc + balance)
				} else {
					(approve_acc, against_acc + votes, capital_acc + balance)
				}
			})
	}
fn tally_delegation ( ref_index : ReferendumIndex ) -> ( BalanceOf < T > , BalanceOf < T > , BalanceOf < T > ) { Self :: voters_for ( ref_index ) . iter ( ) . fold ( ( Zero :: zero ( ) , Zero :: zero ( ) , Zero :: zero ( ) ) , | ( approve_acc , against_acc , capital_acc ) , voter | { let vote = Self :: vote_of ( ( ref_index , voter . clone ( ) ) ) ; let ( votes , balance ) = Self :: delegated_votes ( ref_index , voter . clone ( ) , vote . multiplier ( ) , MAX_RECURSION_LIMIT ) ; if vote . is_aye ( ) { ( approve_acc + votes , against_acc , capital_acc + balance ) } else { ( approve_acc , against_acc + votes , capital_acc + balance ) } } ) }
Get the delegated voters for the current proposal.
Get the delegated voters for the current proposal .
ref_index
ReferendumIndex
ref_index
ReferendumIndex