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
+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();