File tree 1 file changed +15
-1
lines changed
cumulus/parachains/runtimes/assets/asset-hub-westend/src
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2162,7 +2162,21 @@ impl_runtime_apis! {
2162
2162
}
2163
2163
2164
2164
fn worst_case_asset_exchange( ) -> Result <( XcmAssets , XcmAssets ) , BenchmarkError > {
2165
- Err ( BenchmarkError :: Skip )
2165
+ use xcm_executor:: traits:: Convert ;
2166
+
2167
+ // Simulate the maximum possible assets for 'give' and 'receive'
2168
+ let mut give_assets = MultiAssets :: new( ) ;
2169
+ let mut receive_assets = MultiAssets :: new( ) ;
2170
+
2171
+ // Loop large asset types for maximum complexity
2172
+ let max_assets = 1_000 ;
2173
+ for i in 0 ..max_assets {
2174
+ let asset_id = AssetId :: Concrete ( Location :: new( 1 , [ Parachain ( 2000 + i) ] ) ) ;
2175
+ give_assets. push( ( asset_id. clone( ) , 1_000_000 * UNITS ) . into( ) ) ;
2176
+ receive_assets. push( ( asset_id, 500_000 * UNITS ) . into( ) ) ;
2177
+ }
2178
+
2179
+ Ok ( ( give_assets. into( ) , receive_assets. into( ) ) )
2166
2180
}
2167
2181
2168
2182
fn universal_alias( ) -> Result <( Location , Junction ) , BenchmarkError > {
You can’t perform that action at this time.
0 commit comments