mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
Deprecate Weight::from_{ref_time, proof_size} (#13475)
* Deprecate Weight::from_{ref_time, proof_size}
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Update templates
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use from_parts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use from_parts
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Dont revert comment 🤦
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
* Update weight files
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* More fixes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Adapt to Master changes
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
7981d4aa59
commit
9e56e1acdd
@@ -233,7 +233,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
let normal_base = <Test as crate::Config>::BlockWeights::get()
|
||||
.get(DispatchClass::Normal)
|
||||
.base_extrinsic;
|
||||
let pre_info = DispatchInfo { weight: Weight::from_ref_time(1000), ..Default::default() };
|
||||
let pre_info = DispatchInfo { weight: Weight::from_parts(1000, 0), ..Default::default() };
|
||||
System::note_applied_extrinsic(&Ok(Some(300).into()), pre_info);
|
||||
System::note_applied_extrinsic(&Ok(Some(1000).into()), pre_info);
|
||||
System::note_applied_extrinsic(
|
||||
@@ -246,7 +246,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
System::note_applied_extrinsic(&Ok((Some(2_500_000), Pays::No).into()), pre_info);
|
||||
System::note_applied_extrinsic(&Ok((Some(500), Pays::No).into()), pre_info);
|
||||
System::note_applied_extrinsic(
|
||||
&Err(DispatchError::BadOrigin.with_weight(Weight::from_ref_time(999))),
|
||||
&Err(DispatchError::BadOrigin.with_weight(Weight::from_parts(999, 0))),
|
||||
pre_info,
|
||||
);
|
||||
|
||||
@@ -260,7 +260,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
System::note_applied_extrinsic(
|
||||
&Err(DispatchErrorWithPostInfo {
|
||||
post_info: PostDispatchInfo {
|
||||
actual_weight: Some(Weight::from_ref_time(800)),
|
||||
actual_weight: Some(Weight::from_parts(800, 0)),
|
||||
pays_fee: Pays::Yes,
|
||||
},
|
||||
error: DispatchError::BadOrigin,
|
||||
@@ -270,7 +270,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
System::note_applied_extrinsic(
|
||||
&Err(DispatchErrorWithPostInfo {
|
||||
post_info: PostDispatchInfo {
|
||||
actual_weight: Some(Weight::from_ref_time(800)),
|
||||
actual_weight: Some(Weight::from_parts(800, 0)),
|
||||
pays_fee: Pays::No,
|
||||
},
|
||||
error: DispatchError::BadOrigin,
|
||||
@@ -283,7 +283,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
.base_extrinsic;
|
||||
assert!(normal_base != operational_base, "Test pre-condition violated");
|
||||
let pre_info = DispatchInfo {
|
||||
weight: Weight::from_ref_time(1000),
|
||||
weight: Weight::from_parts(1000, 0),
|
||||
class: DispatchClass::Operational,
|
||||
..Default::default()
|
||||
};
|
||||
@@ -295,7 +295,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
phase: Phase::ApplyExtrinsic(0),
|
||||
event: SysEvent::ExtrinsicSuccess {
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(300).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(300, 0).saturating_add(normal_base),
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
@@ -306,7 +306,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
phase: Phase::ApplyExtrinsic(1),
|
||||
event: SysEvent::ExtrinsicSuccess {
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
@@ -317,7 +317,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
phase: Phase::ApplyExtrinsic(2),
|
||||
event: SysEvent::ExtrinsicSuccess {
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
@@ -328,7 +328,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
phase: Phase::ApplyExtrinsic(3),
|
||||
event: SysEvent::ExtrinsicSuccess {
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
|
||||
pays_fee: Pays::Yes,
|
||||
..Default::default()
|
||||
},
|
||||
@@ -340,7 +340,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
phase: Phase::ApplyExtrinsic(4),
|
||||
event: SysEvent::ExtrinsicSuccess {
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
|
||||
pays_fee: Pays::No,
|
||||
..Default::default()
|
||||
},
|
||||
@@ -352,7 +352,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
phase: Phase::ApplyExtrinsic(5),
|
||||
event: SysEvent::ExtrinsicSuccess {
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
|
||||
pays_fee: Pays::No,
|
||||
..Default::default()
|
||||
},
|
||||
@@ -364,7 +364,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
phase: Phase::ApplyExtrinsic(6),
|
||||
event: SysEvent::ExtrinsicSuccess {
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(500).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(500, 0).saturating_add(normal_base),
|
||||
pays_fee: Pays::No,
|
||||
..Default::default()
|
||||
},
|
||||
@@ -377,7 +377,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
event: SysEvent::ExtrinsicFailed {
|
||||
dispatch_error: DispatchError::BadOrigin.into(),
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(999).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(999, 0).saturating_add(normal_base),
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
@@ -389,7 +389,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
event: SysEvent::ExtrinsicFailed {
|
||||
dispatch_error: DispatchError::BadOrigin.into(),
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(1000).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(1000, 0).saturating_add(normal_base),
|
||||
pays_fee: Pays::Yes,
|
||||
..Default::default()
|
||||
},
|
||||
@@ -402,7 +402,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
event: SysEvent::ExtrinsicFailed {
|
||||
dispatch_error: DispatchError::BadOrigin.into(),
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(800).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(800, 0).saturating_add(normal_base),
|
||||
pays_fee: Pays::Yes,
|
||||
..Default::default()
|
||||
},
|
||||
@@ -415,7 +415,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
event: SysEvent::ExtrinsicFailed {
|
||||
dispatch_error: DispatchError::BadOrigin.into(),
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(800).saturating_add(normal_base),
|
||||
weight: Weight::from_parts(800, 0).saturating_add(normal_base),
|
||||
pays_fee: Pays::No,
|
||||
..Default::default()
|
||||
},
|
||||
@@ -427,7 +427,7 @@ fn deposit_event_uses_actual_weight_and_pays_fee() {
|
||||
phase: Phase::ApplyExtrinsic(11),
|
||||
event: SysEvent::ExtrinsicSuccess {
|
||||
dispatch_info: DispatchInfo {
|
||||
weight: Weight::from_ref_time(300).saturating_add(operational_base),
|
||||
weight: Weight::from_parts(300, 0).saturating_add(operational_base),
|
||||
class: DispatchClass::Operational,
|
||||
..Default::default()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user