[Deprecation] Remove sp_weights::OldWeight (#3491)

# Description

*Removes `sp_weights::OldWeight` and its usage*

Fixes #144

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
This commit is contained in:
philoniare
2024-02-29 13:17:24 +08:00
committed by GitHub
parent 833bafdbf7
commit a22319cdd5
4 changed files with 47 additions and 84 deletions
-11
View File
@@ -1821,17 +1821,6 @@ mod tests {
assert!(weight_left.all_gt(actual_left), "gas_left must be greater than final");
}
/// Test that [`frame_support::weights::OldWeight`] en/decodes the same as our
/// [`crate::OldWeight`].
#[test]
fn old_weight_decode() {
#![allow(deprecated)]
let sp = frame_support::weights::OldWeight(42).encode();
let our = crate::OldWeight::decode(&mut &*sp).unwrap();
assert_eq!(our, 42);
}
const CODE_VALUE_TRANSFERRED: &str = r#"
(module
(import "seal0" "seal_value_transferred" (func $seal_value_transferred (param i32 i32)))