mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 08:51:04 +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
@@ -188,14 +188,14 @@ macro_rules! decl_tests {
|
||||
ChargeTransactionPayment::from(1),
|
||||
&1,
|
||||
CALL,
|
||||
&info_from_weight(Weight::from_ref_time(1)),
|
||||
&info_from_weight(Weight::from_parts(1, 0)),
|
||||
1,
|
||||
).is_err());
|
||||
assert_ok!(<ChargeTransactionPayment<$test> as SignedExtension>::pre_dispatch(
|
||||
ChargeTransactionPayment::from(0),
|
||||
&1,
|
||||
CALL,
|
||||
&info_from_weight(Weight::from_ref_time(1)),
|
||||
&info_from_weight(Weight::from_parts(1, 0)),
|
||||
1,
|
||||
));
|
||||
|
||||
@@ -206,14 +206,14 @@ macro_rules! decl_tests {
|
||||
ChargeTransactionPayment::from(1),
|
||||
&1,
|
||||
CALL,
|
||||
&info_from_weight(Weight::from_ref_time(1)),
|
||||
&info_from_weight(Weight::from_parts(1, 0)),
|
||||
1,
|
||||
).is_err());
|
||||
assert!(<ChargeTransactionPayment<$test> as SignedExtension>::pre_dispatch(
|
||||
ChargeTransactionPayment::from(0),
|
||||
&1,
|
||||
CALL,
|
||||
&info_from_weight(Weight::from_ref_time(1)),
|
||||
&info_from_weight(Weight::from_parts(1, 0)),
|
||||
1,
|
||||
).is_err());
|
||||
});
|
||||
|
||||
@@ -48,7 +48,7 @@ frame_support::construct_runtime!(
|
||||
parameter_types! {
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::simple_max(
|
||||
frame_support::weights::Weight::from_ref_time(1024).set_proof_size(u64::MAX),
|
||||
frame_support::weights::Weight::from_parts(1024, u64::MAX),
|
||||
);
|
||||
pub static ExistentialDeposit: u64 = 0;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ frame_support::construct_runtime!(
|
||||
parameter_types! {
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::simple_max(
|
||||
frame_support::weights::Weight::from_ref_time(1024).set_proof_size(u64::MAX),
|
||||
frame_support::weights::Weight::from_parts(1024, u64::MAX),
|
||||
);
|
||||
pub static ExistentialDeposit: u64 = 0;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ frame_support::construct_runtime!(
|
||||
parameter_types! {
|
||||
pub BlockWeights: frame_system::limits::BlockWeights =
|
||||
frame_system::limits::BlockWeights::simple_max(
|
||||
frame_support::weights::Weight::from_ref_time(1024).set_proof_size(u64::MAX),
|
||||
frame_support::weights::Weight::from_parts(1024, u64::MAX),
|
||||
);
|
||||
pub static ExistentialDeposit: u64 = 0;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 37_815 nanoseconds.
|
||||
Weight::from_ref_time(38_109_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(38_109_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -80,8 +80,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 28_184 nanoseconds.
|
||||
Weight::from_ref_time(49_250_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(49_250_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -92,8 +92,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `206`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 17_474 nanoseconds.
|
||||
Weight::from_ref_time(17_777_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(17_777_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -104,8 +104,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `206`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 20_962 nanoseconds.
|
||||
Weight::from_ref_time(21_419_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(21_419_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -116,8 +116,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `135`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 39_713 nanoseconds.
|
||||
Weight::from_ref_time(40_360_000)
|
||||
.saturating_add(Weight::from_proof_size(6196))
|
||||
Weight::from_parts(40_360_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(T::DbWeight::get().reads(2_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(2_u64))
|
||||
}
|
||||
@@ -128,8 +128,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 34_878 nanoseconds.
|
||||
Weight::from_ref_time(35_121_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(35_121_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -140,8 +140,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
|
||||
// Measured: `206`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 16_790 nanoseconds.
|
||||
Weight::from_ref_time(17_029_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(17_029_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(T::DbWeight::get().reads(1_u64))
|
||||
.saturating_add(T::DbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -156,8 +156,8 @@ impl WeightInfo for () {
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 37_815 nanoseconds.
|
||||
Weight::from_ref_time(38_109_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(38_109_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -168,8 +168,8 @@ impl WeightInfo for () {
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 28_184 nanoseconds.
|
||||
Weight::from_ref_time(49_250_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(49_250_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -180,8 +180,8 @@ impl WeightInfo for () {
|
||||
// Measured: `206`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 17_474 nanoseconds.
|
||||
Weight::from_ref_time(17_777_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(17_777_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -192,8 +192,8 @@ impl WeightInfo for () {
|
||||
// Measured: `206`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 20_962 nanoseconds.
|
||||
Weight::from_ref_time(21_419_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(21_419_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -204,8 +204,8 @@ impl WeightInfo for () {
|
||||
// Measured: `135`
|
||||
// Estimated: `6196`
|
||||
// Minimum execution time: 39_713 nanoseconds.
|
||||
Weight::from_ref_time(40_360_000)
|
||||
.saturating_add(Weight::from_proof_size(6196))
|
||||
Weight::from_parts(40_360_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6196))
|
||||
.saturating_add(RocksDbWeight::get().reads(2_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(2_u64))
|
||||
}
|
||||
@@ -216,8 +216,8 @@ impl WeightInfo for () {
|
||||
// Measured: `0`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 34_878 nanoseconds.
|
||||
Weight::from_ref_time(35_121_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(35_121_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
@@ -228,8 +228,8 @@ impl WeightInfo for () {
|
||||
// Measured: `206`
|
||||
// Estimated: `3593`
|
||||
// Minimum execution time: 16_790 nanoseconds.
|
||||
Weight::from_ref_time(17_029_000)
|
||||
.saturating_add(Weight::from_proof_size(3593))
|
||||
Weight::from_parts(17_029_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3593))
|
||||
.saturating_add(RocksDbWeight::get().reads(1_u64))
|
||||
.saturating_add(RocksDbWeight::get().writes(1_u64))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user