mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 02:01:02 +00:00
Add tipping into treasury (#4480)
* First draft * Initial work on tests * Add tests. * Ensure old members can't tip. * Fix complexity * Update node runtime * Build fix. * build fix * Fix tests * Fix tests * Refactor Contains impl for tests * Introduce new way to avoid impl Contains conflicts * Fixes * Docs. * Docs. * Typo * Whitespace * Docs * Typo * Formatting * Update frame/treasury/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/treasury/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/treasury/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Apply suggestions from code review Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Add provisional weights. Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
committed by
Shawn Tabrizi
parent
586685fca0
commit
67202b7ec3
@@ -1144,8 +1144,7 @@ mod tests {
|
||||
use std::cell::RefCell;
|
||||
use frame_support::{
|
||||
impl_outer_origin, impl_outer_dispatch, assert_noop, assert_ok, parameter_types,
|
||||
traits::Contains,
|
||||
weights::Weight,
|
||||
ord_parameter_types, traits::Contains, weights::Weight,
|
||||
};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::{
|
||||
@@ -1221,6 +1220,8 @@ mod tests {
|
||||
pub const MinimumDeposit: u64 = 1;
|
||||
pub const EnactmentPeriod: u64 = 2;
|
||||
pub const CooloffPeriod: u64 = 2;
|
||||
}
|
||||
ord_parameter_types! {
|
||||
pub const One: u64 = 1;
|
||||
pub const Two: u64 = 2;
|
||||
pub const Three: u64 = 3;
|
||||
@@ -1229,8 +1230,8 @@ mod tests {
|
||||
}
|
||||
pub struct OneToFive;
|
||||
impl Contains<u64> for OneToFive {
|
||||
fn contains(n: &u64) -> bool {
|
||||
*n >= 1 && *n <= 5
|
||||
fn sorted_members() -> Vec<u64> {
|
||||
vec![1, 2, 3, 4, 5]
|
||||
}
|
||||
}
|
||||
thread_local! {
|
||||
|
||||
Reference in New Issue
Block a user