Allow council to slash treasury tip (#2147)

* wk2052 | D1 |Allow council to slash treasury tip | p1

* wk2052 | D1 | Allow council to slash treasury tip | p2

* Update Cargo.lock

* "Update Substrate"

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
This commit is contained in:
RK
2020-12-30 00:39:03 +05:30
committed by GitHub
parent f06dc3a306
commit 646376e654
3 changed files with 181 additions and 156 deletions
+138 -138
View File
File diff suppressed because it is too large Load Diff
@@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_tips //! Autogenerated weights for pallet_tips
//! //!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0
//! DATE: 2020-11-20, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] //! DATE: 2020-12-20, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: []
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
// Executed Command: // Executed Command:
@@ -35,6 +35,7 @@
// --output=./frame/tips/src/weights.rs // --output=./frame/tips/src/weights.rs
// --template=./.maintain/frame-weight-template.hbs // --template=./.maintain/frame-weight-template.hbs
#![allow(unused_parens)] #![allow(unused_parens)]
#![allow(unused_imports)] #![allow(unused_imports)]
@@ -45,33 +46,45 @@ use sp_std::marker::PhantomData;
pub struct WeightInfo<T>(PhantomData<T>); pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_tips::WeightInfo for WeightInfo<T> { impl<T: frame_system::Config> pallet_tips::WeightInfo for WeightInfo<T> {
fn report_awesome(r: u32, ) -> Weight { fn report_awesome(r: u32, ) -> Weight {
(70_338_000 as Weight) (73_795_000 as Weight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(r as Weight)) .saturating_add((2_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight))
} }
fn retract_tip() -> Weight { fn retract_tip() -> Weight {
(59_051_000 as Weight) (61_753_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight))
} }
fn tip_new(r: u32, t: u32, ) -> Weight { fn tip_new(r: u32, t: u32, ) -> Weight {
(41_984_000 as Weight) (47_731_000 as Weight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(r as Weight)) .saturating_add((2_000 as Weight).saturating_mul(r as Weight))
.saturating_add((180_000 as Weight).saturating_mul(t as Weight)) // Standard Error: 0
.saturating_add((154_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight))
} }
fn tip(t: u32, ) -> Weight { fn tip(t: u32, ) -> Weight {
(33_313_000 as Weight) (35_215_000 as Weight)
.saturating_add((700_000 as Weight).saturating_mul(t as Weight)) // Standard Error: 1_000
.saturating_add((712_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight))
} }
fn close_tip(t: u32, ) -> Weight { fn close_tip(t: u32, ) -> Weight {
(110_781_000 as Weight) (117_027_000 as Weight)
.saturating_add((364_000 as Weight).saturating_mul(t as Weight)) // Standard Error: 1_000
.saturating_add((375_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight))
} }
fn slash_tip(t: u32, ) -> Weight {
(37_184_000 as Weight)
// Standard Error: 0
.saturating_add((11_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
} }
@@ -18,7 +18,7 @@
//! Autogenerated weights for pallet_tips //! Autogenerated weights for pallet_tips
//! //!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0
//! DATE: 2020-11-20, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: [] //! DATE: 2020-12-20, STEPS: [50, ], REPEAT: 20, LOW RANGE: [], HIGH RANGE: []
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128 //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 128
// Executed Command: // Executed Command:
@@ -46,33 +46,45 @@ use sp_std::marker::PhantomData;
pub struct WeightInfo<T>(PhantomData<T>); pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_tips::WeightInfo for WeightInfo<T> { impl<T: frame_system::Config> pallet_tips::WeightInfo for WeightInfo<T> {
fn report_awesome(r: u32, ) -> Weight { fn report_awesome(r: u32, ) -> Weight {
(70_338_000 as Weight) (73_795_000 as Weight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(r as Weight)) .saturating_add((2_000 as Weight).saturating_mul(r as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight))
} }
fn retract_tip() -> Weight { fn retract_tip() -> Weight {
(59_051_000 as Weight) (61_753_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight)) .saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight))
} }
fn tip_new(r: u32, t: u32, ) -> Weight { fn tip_new(r: u32, t: u32, ) -> Weight {
(41_984_000 as Weight) (47_731_000 as Weight)
// Standard Error: 0
.saturating_add((2_000 as Weight).saturating_mul(r as Weight)) .saturating_add((2_000 as Weight).saturating_mul(r as Weight))
.saturating_add((180_000 as Weight).saturating_mul(t as Weight)) // Standard Error: 0
.saturating_add((154_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight)) .saturating_add(T::DbWeight::get().writes(2 as Weight))
} }
fn tip(t: u32, ) -> Weight { fn tip(t: u32, ) -> Weight {
(33_313_000 as Weight) (35_215_000 as Weight)
.saturating_add((700_000 as Weight).saturating_mul(t as Weight)) // Standard Error: 1_000
.saturating_add((712_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight)) .saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight)) .saturating_add(T::DbWeight::get().writes(1 as Weight))
} }
fn close_tip(t: u32, ) -> Weight { fn close_tip(t: u32, ) -> Weight {
(110_781_000 as Weight) (117_027_000 as Weight)
.saturating_add((364_000 as Weight).saturating_mul(t as Weight)) // Standard Error: 1_000
.saturating_add((375_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight)) .saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight)) .saturating_add(T::DbWeight::get().writes(3 as Weight))
} }
fn slash_tip(t: u32, ) -> Weight {
(37_184_000 as Weight)
// Standard Error: 0
.saturating_add((11_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
} }