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
+4 -1
View File
@@ -214,7 +214,10 @@ impl Metadata {
MetadataHasher::new(self)
}
/// Filter out any pallets that we don't want to keep, retaining only those that we do.
/// Filter out any pallets and/or runtime_apis that we don't want to keep, retaining only those that we do.
/// Note:
/// only filter by `pallet`s will not lead to significant metadata size reduction because the return types are kept to ensure that those can be decoded.
///
pub fn retain<F, G>(&mut self, pallet_filter: F, api_filter: G)
where
F: FnMut(&str) -> bool,