referrerpolicy=no-referrer-when-downgrade

pallet_election_provider_multi_block/weights/
mod.rs

1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// 	http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18//! WeightInfo for the election provider multi-block pallet group.
19
20mod pallet_election_provider_multi_block_dot_size;
21mod pallet_election_provider_multi_block_signed_dot_size;
22mod pallet_election_provider_multi_block_unsigned_dot_size;
23mod pallet_election_provider_multi_block_verifier_dot_size;
24
25mod pallet_election_provider_multi_block_ksm_size;
26mod pallet_election_provider_multi_block_signed_ksm_size;
27mod pallet_election_provider_multi_block_unsigned_ksm_size;
28mod pallet_election_provider_multi_block_verifier_ksm_size;
29
30use frame_support::pallet_prelude::Weight;
31
32pub mod traits {
33	use super::*;
34	pub mod pallet_election_provider_multi_block_signed {
35		use super::*;
36
37		/// Weight functions needed for `pallet_election_provider_multi_block_signed`.
38		pub trait WeightInfo {
39			fn register_not_full() -> Weight;
40			fn register_eject() -> Weight;
41			fn submit_page() -> Weight;
42			fn unset_page() -> Weight;
43			fn bail() -> Weight;
44			fn clear_old_round_data(p: u32) -> Weight;
45		}
46
47		impl WeightInfo for () {
48			fn bail() -> Weight {
49				Default::default()
50			}
51			fn clear_old_round_data(_p: u32) -> Weight {
52				Default::default()
53			}
54			fn register_eject() -> Weight {
55				Default::default()
56			}
57			fn register_not_full() -> Weight {
58				Default::default()
59			}
60			fn submit_page() -> Weight {
61				Default::default()
62			}
63			fn unset_page() -> Weight {
64				Default::default()
65			}
66		}
67	}
68
69	pub mod pallet_election_provider_multi_block_unsigned {
70		use super::*;
71
72		/// Weight functions needed for `pallet_election_provider_multi_block::unsigned`.
73		pub trait WeightInfo {
74			fn validate_unsigned() -> Weight;
75			fn submit_unsigned() -> Weight;
76			// This has an auto-impl as the associated benchmark is `#[extra]`.
77			fn mine_solution(_p: u32) -> Weight {
78				Default::default()
79			}
80		}
81
82		impl WeightInfo for () {
83			fn validate_unsigned() -> Weight {
84				Default::default()
85			}
86			fn submit_unsigned() -> Weight {
87				Default::default()
88			}
89		}
90	}
91
92	pub mod pallet_election_provider_multi_block_verifier {
93		use super::*;
94
95		/// Weight functions needed for `pallet_election_provider_multi_block_verifier`.
96		pub trait WeightInfo {
97			fn on_initialize_valid_non_terminal() -> Weight;
98			fn on_initialize_valid_terminal() -> Weight;
99			fn on_initialize_invalid_terminal() -> Weight;
100			fn on_initialize_invalid_non_terminal(v: u32) -> Weight;
101		}
102
103		impl WeightInfo for () {
104			fn on_initialize_valid_non_terminal() -> Weight {
105				Default::default()
106			}
107			fn on_initialize_valid_terminal() -> Weight {
108				Default::default()
109			}
110			fn on_initialize_invalid_terminal() -> Weight {
111				Default::default()
112			}
113			fn on_initialize_invalid_non_terminal(_v: u32) -> Weight {
114				Default::default()
115			}
116		}
117	}
118
119	pub mod pallet_election_provider_multi_block {
120		use super::*;
121
122		/// Weight functions needed for `pallet_election_provider_multi_block`.
123		pub trait WeightInfo {
124			fn on_initialize_nothing() -> Weight;
125			fn on_initialize_into_snapshot_msp() -> Weight;
126			fn on_initialize_into_snapshot_rest() -> Weight;
127			fn on_initialize_into_signed() -> Weight;
128			fn on_initialize_into_signed_validation() -> Weight;
129			fn on_initialize_into_unsigned() -> Weight;
130			fn export_non_terminal() -> Weight;
131			fn export_terminal() -> Weight;
132			fn manage() -> Weight;
133		}
134
135		impl WeightInfo for () {
136			fn on_initialize_nothing() -> Weight {
137				Default::default()
138			}
139			fn on_initialize_into_snapshot_msp() -> Weight {
140				Default::default()
141			}
142			fn on_initialize_into_snapshot_rest() -> Weight {
143				Default::default()
144			}
145			fn on_initialize_into_signed() -> Weight {
146				Default::default()
147			}
148			fn on_initialize_into_signed_validation() -> Weight {
149				Default::default()
150			}
151			fn on_initialize_into_unsigned() -> Weight {
152				Default::default()
153			}
154			fn export_non_terminal() -> Weight {
155				Default::default()
156			}
157			fn export_terminal() -> Weight {
158				Default::default()
159			}
160			fn manage() -> Weight {
161				Default::default()
162			}
163		}
164	}
165}
166
167pub mod kusama {
168	pub use super::{
169		pallet_election_provider_multi_block_ksm_size::WeightInfo as MultiBlockWeightInfo,
170		pallet_election_provider_multi_block_signed_ksm_size::WeightInfo as MultiBlockSignedWeightInfo,
171		pallet_election_provider_multi_block_unsigned_ksm_size::WeightInfo as MultiBlockUnsignedWeightInfo,
172		pallet_election_provider_multi_block_verifier_ksm_size::WeightInfo as MultiBlockVerifierWeightInfo,
173	};
174}
175
176pub mod polkadot {
177	pub use super::{
178		pallet_election_provider_multi_block_dot_size::WeightInfo as MultiBlockWeightInfo,
179		pallet_election_provider_multi_block_signed_dot_size::WeightInfo as MultiBlockSignedWeightInfo,
180		pallet_election_provider_multi_block_unsigned_dot_size::WeightInfo as MultiBlockUnsignedWeightInfo,
181		pallet_election_provider_multi_block_verifier_dot_size::WeightInfo as MultiBlockVerifierWeightInfo,
182	};
183}
184pub mod westend {
185	pub use super::polkadot::*;
186}