Migrate to Weight::from_parts (#6794)

* Migrate to from_parts

Have a look at https://github.com/ggwpez/substrate-scripts/blob/master/migrate-from-parts.py

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Adapt to master

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* update lockfile for {"substrate"}

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
This commit is contained in:
Oliver Tale-Yazdi
2023-03-03 00:32:30 +01:00
committed by GitHub
parent c5637bda91
commit 177bedc160
187 changed files with 4080 additions and 4088 deletions
@@ -26,7 +26,7 @@ benchmarks! {
set_config_with_option_u32 {}: set_max_validators(RawOrigin::Root, Some(10))
set_config_with_weight {}: set_ump_service_total_weight(RawOrigin::Root, Weight::from_ref_time(3_000_000))
set_config_with_weight {}: set_ump_service_total_weight(RawOrigin::Root, Weight::from_parts(3_000_000, 0))
set_hrmp_open_request_ttl {}: {
Err(BenchmarkError::Override(
@@ -37,15 +37,15 @@ pub struct TestWeightInfo;
impl WeightInfo for TestWeightInfo {
fn enter_variable_disputes(v: u32) -> Weight {
// MAX Block Weight should fit 4 disputes
Weight::from_ref_time(80_000 * v as u64 + 80_000)
Weight::from_parts(80_000 * v as u64 + 80_000, 0)
}
fn enter_bitfields() -> Weight {
// MAX Block Weight should fit 4 backed candidates
Weight::from_ref_time(40_000u64)
Weight::from_parts(40_000u64, 0)
}
fn enter_backed_candidates_variable(v: u32) -> Weight {
// MAX Block Weight should fit 4 backed candidates
Weight::from_ref_time(40_000 * v as u64 + 40_000)
Weight::from_parts(40_000 * v as u64 + 40_000, 0)
}
fn enter_backed_candidate_code_upgrade() -> Weight {
Weight::zero()