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

Commit

Permalink
Tighter bound on asset types teleported so that weight is cheaper (#6980
Browse files Browse the repository at this point in the history
)

* Tighter bound on asset types so that weight is cheaper

* cargo fmt
  • Loading branch information
gilescope authored Mar 30, 2023
1 parent 31dde2d commit f45a5b4
Showing 1 changed file with 4 additions and 2 deletions.
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 },
]);
let weight =
T::Weigher::weight(&mut message).map_err(|()| Error::<T>::UnweighableMessage)?;
let hash = message.using_encoded(sp_io::hashing::blake2_256);
Expand Down

0 comments on commit f45a5b4

Please sign in to comment.