Revert "[Fix] Weight calculations for Wild -> affects teleports (#1639)" (#1640)

This reverts commit 14115c82de.
This commit is contained in:
joe petrowski
2022-09-19 22:18:14 +02:00
committed by GitHub
parent 14115c82de
commit 822c4d7962
4 changed files with 33 additions and 68 deletions
-14
View File
@@ -119,17 +119,3 @@ impl<Location: Get<MultiLocation>> FilterAssetLocation for ConcreteNativeAssetFr
matches!(asset.id, Concrete(ref id) if id == origin && origin == &Location::get())
}
}
/// A generic function to use for MultiAssetFilter implementations, currently used to differentiate
/// between reserve operations and the rest of them.
pub fn weigh_multi_assets_generic(
filter: &MultiAssetFilter,
weight: Weight,
max_assets: u32,
) -> XCMWeight {
let multiplier = match filter {
MultiAssetFilter::Definite(assets) => assets.len() as u64,
MultiAssetFilter::Wild(_) => max_assets as u64,
};
weight.saturating_mul(multiplier).ref_time()
}