mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Allow council to slash treasury tip (#7753)
* wk2051 | D4 |Allow council to slash treasury tip | p1 * Update frame/tips/src/lib.rs Co-authored-by: Xiliang Chen <xlchen1291@gmail.com> * wk2051 | D5 |Allow council to slash treasury tip | p2 * wk2051 | D5 |Allow council to slash treasury tip | p3 * wk2051 | D5 |Allow council to slash treasury tip | p4 * wk2051 | D5 |Allow council to slash treasury tip | p5 * random change * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_tips --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/tips/src/weights.rs --template=./.maintain/frame-weight-template.hbs * fix typo * Update frame/tips/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/tips/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/tips/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/tips/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/tips/src/tests.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * wk2052 | D1 | Allow council to slash treasury tip | p6 Co-authored-by: Xiliang Chen <xlchen1291@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Parity Benchmarking Bot <admin@parity.io> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -18,11 +18,11 @@
|
||||
//! Autogenerated weights for pallet_tips
|
||||
//!
|
||||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 2.0.0
|
||||
//! DATE: 2020-12-16, 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
|
||||
|
||||
// Executed Command:
|
||||
// ./target/release/substrate
|
||||
// target/release/substrate
|
||||
// benchmark
|
||||
// --chain=dev
|
||||
// --steps=50
|
||||
@@ -49,83 +49,98 @@ pub trait WeightInfo {
|
||||
fn tip_new(r: u32, t: u32, ) -> Weight;
|
||||
fn tip(t: u32, ) -> Weight;
|
||||
fn close_tip(t: u32, ) -> Weight;
|
||||
fn slash_tip(t: u32, ) -> Weight;
|
||||
}
|
||||
|
||||
/// Weights for pallet_tips using the Substrate node and recommended hardware.
|
||||
pub struct SubstrateWeight<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
fn report_awesome(r: u32, ) -> Weight {
|
||||
(74_814_000 as Weight)
|
||||
(73_795_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.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().writes(2 as Weight))
|
||||
}
|
||||
fn retract_tip() -> Weight {
|
||||
(62_962_000 as Weight)
|
||||
(61_753_000 as Weight)
|
||||
.saturating_add(T::DbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(T::DbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn tip_new(r: u32, t: u32, ) -> Weight {
|
||||
(48_132_000 as Weight)
|
||||
(47_731_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((155_000 as Weight).saturating_mul(t as Weight))
|
||||
.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().writes(2 as Weight))
|
||||
}
|
||||
fn tip(t: u32, ) -> Weight {
|
||||
(36_168_000 as Weight)
|
||||
(35_215_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((695_000 as Weight).saturating_mul(t as Weight))
|
||||
.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().writes(1 as Weight))
|
||||
}
|
||||
fn close_tip(t: u32, ) -> Weight {
|
||||
(119_313_000 as Weight)
|
||||
(117_027_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((372_000 as Weight).saturating_mul(t as Weight))
|
||||
.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().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))
|
||||
}
|
||||
}
|
||||
|
||||
// For backwards compatibility and tests
|
||||
impl WeightInfo for () {
|
||||
fn report_awesome(r: u32, ) -> Weight {
|
||||
(74_814_000 as Weight)
|
||||
(73_795_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(r as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn retract_tip() -> Weight {
|
||||
(62_962_000 as Weight)
|
||||
(61_753_000 as Weight)
|
||||
.saturating_add(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn tip_new(r: u32, t: u32, ) -> Weight {
|
||||
(48_132_000 as Weight)
|
||||
(47_731_000 as Weight)
|
||||
// Standard Error: 0
|
||||
.saturating_add((2_000 as Weight).saturating_mul(r as Weight))
|
||||
// Standard Error: 0
|
||||
.saturating_add((155_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((154_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
fn tip(t: u32, ) -> Weight {
|
||||
(36_168_000 as Weight)
|
||||
(35_215_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((695_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((712_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(2 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(1 as Weight))
|
||||
}
|
||||
fn close_tip(t: u32, ) -> Weight {
|
||||
(119_313_000 as Weight)
|
||||
(117_027_000 as Weight)
|
||||
// Standard Error: 1_000
|
||||
.saturating_add((372_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add((375_000 as Weight).saturating_mul(t as Weight))
|
||||
.saturating_add(RocksDbWeight::get().reads(3 as Weight))
|
||||
.saturating_add(RocksDbWeight::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(RocksDbWeight::get().reads(1 as Weight))
|
||||
.saturating_add(RocksDbWeight::get().writes(2 as Weight))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user