Function pallet_bags_list::notional_bag_for[][src]

pub fn notional_bag_for<T: Config>(weight: VoteWeight) -> VoteWeight
Expand description

Given a certain vote weight, to which bag does it belong to?

Bags are identified by their upper threshold; the value returned by this function is guaranteed to be a member of T::BagThresholds.

Note that even if the thresholds list does not have VoteWeight::MAX as its final member, this function behaves as if it does.