Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Tighter bound on asset types teleported so that weight is cheaper #6980

Merged
merged 2 commits into from
Mar 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,8 +1203,10 @@ impl<T: Config> Pallet<T> {
BuyExecution { fees, weight_limit },
DepositAsset { assets: Wild(AllCounted(max_assets)), beneficiary },
]);
let mut message =
Xcm(vec![WithdrawAsset(assets), InitiateTeleport { assets: Wild(All), dest, xcm }]);
let mut message = Xcm(vec![
WithdrawAsset(assets),
InitiateTeleport { assets: Wild(AllCounted(max_assets)), dest, xcm },
bkontur marked this conversation as resolved.
Show resolved Hide resolved
]);
let weight =
T::Weigher::weight(&mut message).map_err(|()| Error::<T>::UnweighableMessage)?;
let hash = message.using_encoded(sp_io::hashing::blake2_256);
Expand Down