Introduce cancel_proposal to rid us of those pesky proposals (#7111)

* Introduce `cancel_proposal`

Also fix proposal weight.

* Support proposal cancellation from runtime.

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fix benchmarks

* fix benchmark

* whitelisted caller weights

* fix build

* Fixes

* Fixes

* Fixes

* Fixes

* Update frame/democracy/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* doc updates

* new weights

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Gavin WoodandShawn Tabrizi authored and GitHub committed 2020-09-24 21:33:02 +00:00
1 parent 1b350a050c
commit 26465eadaa
10 files changed
+423 -235

No files matched your search

@@ -219,3 +219,12 @@ pub fn account<AccountId: Decode + Default>(name: &'static str, index: u32, seed
pub fn whitelisted_caller<AccountId: Decode + Default>() -> AccountId {
account::<AccountId>("whitelisted_caller", 0, 0)
}
#[macro_export]
macro_rules! whitelist_account {
($acc:ident) => {
frame_benchmarking::benchmarking::add_to_whitelist(
frame_system::Account::<T>::hashed_key_for(&$acc).into()
);
}
}