Strip metadata fix (#1774)

* Fix metadata stripping being too eager

closes #1659

---------

Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
This commit is contained in:
Pavlo Khrystenko
2024-10-21 22:41:14 +02:00
committed by GitHub
parent 9527165a40
commit ae0fce8dff
7 changed files with 350 additions and 233 deletions
+5 -1
View File
@@ -589,7 +589,11 @@ impl<'a> MetadataHasher<'a> {
// Get the hashes of outer enums, considering only `specific_pallets` (if any are set).
// If any of the typed that represent outer enums are encountered later, hashes from `top_level_enum_hashes` can be substituted.
let outer_enum_hashes = OuterEnumHashes::new(metadata, self.specific_pallets.as_deref());
let outer_enum_hashes = OuterEnumHashes::new(
metadata,
self.specific_pallets.as_deref(),
self.specific_runtime_apis.as_deref(),
);
let pallet_hash = metadata.pallets().fold([0u8; HASH_LEN], |bytes, pallet| {
// If specific pallets are given, only include this pallet if it is in the specific pallets.