mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 08:51:09 +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:
@@ -190,9 +190,7 @@ impl<T: Default> Get<T> for () {
|
||||
fn get() -> T { T::default() }
|
||||
}
|
||||
|
||||
/// A trait for querying whether a type can be said to statically "contain" a value. Similar
|
||||
/// in nature to `Get`, except it is designed to be lazy rather than active (you can't ask it to
|
||||
/// enumerate all values that it contains) and work for multiple values rather than just one.
|
||||
/// A trait for querying whether a type can be said to "contain" a value.
|
||||
pub trait Contains<T: Ord> {
|
||||
/// Return `true` if this "contains" the given value `t`.
|
||||
fn contains(t: &T) -> bool { Self::sorted_members().binary_search(t).is_ok() }
|
||||
@@ -211,6 +209,14 @@ pub trait Contains<T: Ord> {
|
||||
fn add(_t: &T) { unimplemented!() }
|
||||
}
|
||||
|
||||
/// A trait for querying bound for the length of an implementation of `Contains`
|
||||
pub trait ContainsLengthBound {
|
||||
/// Minimum number of elements contained
|
||||
fn min_len() -> usize;
|
||||
/// Maximum number of elements contained
|
||||
fn max_len() -> usize;
|
||||
}
|
||||
|
||||
/// Determiner to say whether a given account is unused.
|
||||
pub trait IsDeadAccount<AccountId> {
|
||||
/// Is the given account dead?
|
||||
|
||||
Reference in New Issue
Block a user