MillauWeight -> BridgeWeight (#1593)

This commit is contained in:
Svyatoslav Nikolsky
2022-10-04 14:18:22 +03:00
committed by Bastian Köcher
parent 4f4200b0eb
commit 6f9bda5db0
12 changed files with 80 additions and 72 deletions
+12 -10
View File
@@ -17,7 +17,7 @@
//! Autogenerated weights for `pallet_bridge_grandpa`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-07-06, STEPS: 50, REPEAT: 20
//! DATE: 2022-10-04, STEPS: 50, REPEAT: 20
//! LOW RANGE: [], HIGH RANGE: []
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled
//! CHAIN: Some("dev"), DB CACHE: 1024
@@ -53,13 +53,15 @@ pub trait WeightInfo {
fn submit_finality_proof(p: u32, v: u32) -> Weight;
}
/// Weights for `pallet_bridge_grandpa` using the Millau node and recommended hardware.
pub struct MillauWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for MillauWeight<T> {
/// Weights for `pallet_bridge_grandpa` that are generated using one of the Bridge testnets.
///
/// Those weights are test only and must never be used in production.
pub struct BridgeWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for BridgeWeight<T> {
fn submit_finality_proof(p: u32, v: u32) -> Weight {
(55_070_000 as Weight)
.saturating_add((39_678_000 as Weight).saturating_mul(p as Weight))
.saturating_add((1_540_000 as Weight).saturating_mul(v as Weight))
(105_417_000 as Weight)
.saturating_add((40_923_000 as Weight).saturating_mul(p as Weight))
.saturating_add((1_691_000 as Weight).saturating_mul(v as Weight))
.saturating_add(T::DbWeight::get().reads(7 as Weight))
.saturating_add(T::DbWeight::get().writes(6 as Weight))
}
@@ -68,9 +70,9 @@ impl<T: frame_system::Config> WeightInfo for MillauWeight<T> {
// For backwards compatibility and tests
impl WeightInfo for () {
fn submit_finality_proof(p: u32, v: u32) -> Weight {
(55_070_000 as Weight)
.saturating_add((39_678_000 as Weight).saturating_mul(p as Weight))
.saturating_add((1_540_000 as Weight).saturating_mul(v as Weight))
(105_417_000 as Weight)
.saturating_add((40_923_000 as Weight).saturating_mul(p as Weight))
.saturating_add((1_691_000 as Weight).saturating_mul(v as Weight))
.saturating_add(RocksDbWeight::get().reads(7 as Weight))
.saturating_add(RocksDbWeight::get().writes(6 as Weight))
}