mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Update treasury weights. (#5723)
* treasury weight formula * use max tippers count * doc * Fix upper bound * rounding a bit * remove unused + doc * as u64 -> as Weight * 2 significative digits rounded up * rename ContainsCountUpperBound -> ContainsLengthBound * add doc * sender account -> origin account * fix
This commit is contained in:
@@ -93,6 +93,7 @@ use frame_support::{
|
||||
traits::{
|
||||
Currency, Get, LockableCurrency, LockIdentifier, ReservableCurrency, WithdrawReasons,
|
||||
ChangeMembers, OnUnbalanced, WithdrawReason, Contains, BalanceStatus, InitializeMembers,
|
||||
ContainsLengthBound,
|
||||
}
|
||||
};
|
||||
use sp_phragmen::{build_support_map, ExtendedBalance, VoteWeight, PhragmenResult};
|
||||
@@ -880,6 +881,15 @@ impl<T: Trait> Contains<T::AccountId> for Module<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Trait> ContainsLengthBound for Module<T> {
|
||||
fn min_len() -> usize { 0 }
|
||||
|
||||
/// Implementation uses a parameter type so calling is cost-free.
|
||||
fn max_len() -> usize {
|
||||
Self::desired_members() as usize
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user