mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
[xcm ] Compatibility fix for xcm benchmarks (#2934)
* Compatibility fix for xcm benchmarks (cause of missing companion) * ".git/.scripts/commands/bench/bench.sh" --subcommand=xcm --runtime=asset-hub-polkadot --runtime_dir=assets --target_dir=cumulus --pallet=pallet_xcm_benchmarks::fungible * Fix for reserve_asset_deposited (https://github.com/paritytech/cumulus/issues/1974) * Revert back hard-coded 1_000_000_000_u64 for `reserve_asset_deposited` with TODOs * ".git/.scripts/commands/bench/bench.sh" --subcommand=xcm --runtime=asset-hub-kusama --runtime_dir=assets --target_dir=cumulus --pallet=pallet_xcm_benchmarks::fungible --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -62,10 +62,16 @@ impl<Call> XcmWeightInfo<Call> for BridgeHubRococoXcmWeight<Call> {
|
||||
fn withdraw_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::withdraw_asset())
|
||||
}
|
||||
// Currently there is no trusted reserve
|
||||
// Currently there is no trusted reserve (`IsReserve = ()`),
|
||||
// but we need this hack for `pallet_xcm::reserve_transfer_assets`
|
||||
// (TODO) fix https://github.com/paritytech/polkadot/pull/7424
|
||||
// (TODO) fix https://github.com/paritytech/polkadot/pull/7546
|
||||
fn reserve_asset_deposited(_assets: &MultiAssets) -> Weight {
|
||||
// TODO: if we change `IsReserve = ...` then use this line...
|
||||
// TODO: or if remote weight estimation is fixed, then remove
|
||||
// TODO: hardcoded - fix https://github.com/paritytech/cumulus/issues/1974
|
||||
Weight::from_parts(1_000_000_000_u64, 0)
|
||||
let hardcoded_weight = Weight::from_parts(1_000_000_000_u64, 0);
|
||||
hardcoded_weight.min(XcmFungibleWeight::<Runtime>::reserve_asset_deposited())
|
||||
}
|
||||
fn receive_teleported_asset(assets: &MultiAssets) -> Weight {
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::receive_teleported_asset())
|
||||
@@ -142,7 +148,7 @@ impl<Call> XcmWeightInfo<Call> for BridgeHubRococoXcmWeight<Call> {
|
||||
_reserve: &MultiLocation,
|
||||
_xcm: &Xcm<()>,
|
||||
) -> Weight {
|
||||
assets.weigh_multi_assets(XcmGeneric::<Runtime>::initiate_reserve_withdraw())
|
||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_reserve_withdraw())
|
||||
}
|
||||
fn initiate_teleport(
|
||||
assets: &MultiAssetFilter,
|
||||
|
||||
Reference in New Issue
Block a user