We count the teleported assets (#7528)

This brings the `limited_teleport_assets` weight into line with the
`teleport_assets` weight.
This commit is contained in:
Squirrel authored and GitHub committed 2023-07-24 08:42:10 +00:00
1 parent 79341dd40f
commit 1f54333732
1 file changed
+2 -1
+2 -1
View File
@@ -1085,10 +1085,11 @@ pub mod pallet {
match (maybe_assets, maybe_dest) {
(Ok(assets), Ok(dest)) => {
use sp_std::vec;
let count = assets.len() as u32;
let mut message = Xcm(vec![
WithdrawAsset(assets),
SetFeesMode { jit_withdraw: true },
InitiateTeleport { assets: Wild(All), dest, xcm: Xcm(vec![]) },
InitiateTeleport { assets: Wild(AllCounted(count)), dest, xcm: Xcm(vec![]) },
]);
T::Weigher::weight(&mut message).map_or(Weight::MAX, |w| T::WeightInfo::teleport_assets().saturating_add(w))
}