XXX: Use v15 docs

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2023-02-22 18:20:00 +02:00
parent 8911550234
commit 16d43d28af
13 changed files with 42 additions and 37 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ description = "Command line utilities for checking metadata compatibility betwee
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] }
frame-metadata = { version = "15.0.0", git = "https://github.com/paritytech/frame-metadata/", branch = "lexnv/md_v15_test", default-features = false, features = ["std", "v14", "v15-unstable"] }
frame-metadata = { version = "15.0.0", path = "/home/lexnv/workspace/frame-metadata/frame-metadata", default-features = false, features = ["std", "v14", "v15-unstable"] }
scale-info = "2.0.0"
sp-core-hashing = "6.0.0"
+9 -7
View File
@@ -377,7 +377,8 @@ pub fn get_metadata_hash(metadata: &RuntimeMetadataV15) -> [u8; 32] {
.pallets
.iter()
.map(|pallet| {
let hash = get_pallet_hash(&metadata.types, pallet);
// let hash = get_pallet_hash(&metadata.types, pallet);
let hash = [0u8; 32];
(&*pallet.name, hash)
})
.collect();
@@ -425,12 +426,13 @@ pub fn get_metadata_per_pallet_hash<T: AsRef<str>>(
let in_pallet = pallets
.iter()
.any(|pallet_ref| pallet_ref.as_ref() == pallet.name);
if in_pallet {
let hash = get_pallet_hash(&metadata.types, pallet);
Some((&*pallet.name, hash))
} else {
None
}
None
// if in_pallet {
// let hash = get_pallet_hash(&metadata.types, pallet);
// Some((&*pallet.name, hash))
// } else {
// None
// }
})
.collect();