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:
Oliver Tale-Yazdi
2023-03-02 22:28:17 +01:00
committed by GitHub
parent 7981d4aa59
commit 9e56e1acdd
101 changed files with 2695 additions and 2857 deletions
+4 -4
View File
@@ -41,7 +41,7 @@ frame_support::construct_runtime!(
);
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
const MAX_BLOCK_WEIGHT: Weight = Weight::from_ref_time(1024).set_proof_size(u64::MAX);
const MAX_BLOCK_WEIGHT: Weight = Weight::from_parts(1024, u64::MAX);
parameter_types! {
pub Version: RuntimeVersion = RuntimeVersion {
@@ -59,15 +59,15 @@ parameter_types! {
write: 100,
};
pub RuntimeBlockWeights: limits::BlockWeights = limits::BlockWeights::builder()
.base_block(Weight::from_ref_time(10))
.base_block(Weight::from_parts(10, 0))
.for_class(DispatchClass::all(), |weights| {
weights.base_extrinsic = Weight::from_ref_time(5);
weights.base_extrinsic = Weight::from_parts(5, 0);
})
.for_class(DispatchClass::Normal, |weights| {
weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAX_BLOCK_WEIGHT);
})
.for_class(DispatchClass::Operational, |weights| {
weights.base_extrinsic = Weight::from_ref_time(10);
weights.base_extrinsic = Weight::from_parts(10, 0);
weights.max_total = Some(MAX_BLOCK_WEIGHT);
weights.reserved = Some(
MAX_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAX_BLOCK_WEIGHT