mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51:05 +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
@@ -367,18 +367,18 @@ mod tests {
|
||||
|
||||
impl OnInitialize<u8> for Test {
|
||||
fn on_initialize(_n: u8) -> Weight {
|
||||
Weight::from_ref_time(10)
|
||||
Weight::from_parts(10, 0)
|
||||
}
|
||||
}
|
||||
impl OnRuntimeUpgrade for Test {
|
||||
fn on_runtime_upgrade() -> Weight {
|
||||
Weight::from_ref_time(20)
|
||||
Weight::from_parts(20, 0)
|
||||
}
|
||||
}
|
||||
|
||||
TestExternalities::default().execute_with(|| {
|
||||
assert_eq!(<(Test, Test)>::on_initialize(0), Weight::from_ref_time(20));
|
||||
assert_eq!(<(Test, Test)>::on_runtime_upgrade(), Weight::from_ref_time(40));
|
||||
assert_eq!(<(Test, Test)>::on_initialize(0), Weight::from_parts(20, 0));
|
||||
assert_eq!(<(Test, Test)>::on_runtime_upgrade(), Weight::from_parts(40, 0));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user