@@ -276,9 +276,6 @@ mod tests {
276276 use sp_runtime:: FixedPointNumber ;
277277
278278 use super :: * ;
279-
280- mod reserves_config {
281- use super :: * ;
282279 use crate :: System ;
283280
284281 fn new_test_ext ( ) -> sp_io:: TestExternalities {
@@ -287,6 +284,9 @@ mod tests {
287284 ext
288285 }
289286
287+ mod reserves_config {
288+ use super :: * ;
289+
290290 // Only reserve accepted is the relay asset from Asset Hub.
291291 #[ test]
292292 fn reserves ( ) {
@@ -872,13 +872,13 @@ mod tests {
872872 ) ;
873873 }
874874
875- #[ test]
876- fn reserve_transfer_filter_only_allows_dot_from_ah ( ) {
877- assert_eq ! (
878- TypeId :: of:: <<Runtime as pallet_xcm:: Config >:: XcmReserveTransferFilter >( ) ,
879- TypeId :: of:: <NativeAssetFrom < AssetHub > >( ) ,
880- ) ;
881- }
875+ #[ test]
876+ fn reserve_transfer_filter_only_allows_dot_from_ah ( ) {
877+ assert_eq ! (
878+ TypeId :: of:: <<Runtime as pallet_xcm:: Config >:: XcmReserveTransferFilter >( ) ,
879+ TypeId :: of:: <Everything >( ) ,
880+ ) ;
881+ }
882882
883883 #[ test]
884884 fn router_uses_ump_for_relay_and_xcmp_for_para ( ) {
@@ -964,36 +964,37 @@ mod tests {
964964 ) ;
965965 }
966966
967- #[ test]
968- fn price_for_sibling_delivery ( ) {
969- assert_eq ! (
970- TypeId :: of:: <<Runtime as cumulus_pallet_xcmp_queue:: Config >:: PriceForSiblingDelivery >( ) ,
971- TypeId :: of:: <
972- ExponentialPrice <RelayLocation , BaseDeliveryFee , TransactionByteFee , XcmpQueue >,
973- >( )
974- ) ;
975-
976- new_test_ext ( ) . execute_with ( || {
977- type ExponentialDeliveryPrice =
978- ExponentialPrice < RelayLocation , BaseDeliveryFee , TransactionByteFee , XcmpQueue > ;
979- let id: ParaId = 420 . into ( ) ;
980- let b: u128 = BaseDeliveryFee :: get ( ) ;
981- let m: u128 = TransactionByteFee :: get ( ) ;
982-
983- // F * (B + msg_length * M)
984- // A: RelayLocation
985- // B: BaseDeliveryFee
986- // M: TransactionByteFee
987- // F: XcmpQueue
988- //
989- // message_length = 1
990- let result: u128 = XcmpQueue :: get_fee_factor ( id) . saturating_mul_int ( b + m) ;
991- assert_eq ! (
992- ExponentialDeliveryPrice :: price_for_delivery( id, & Xcm ( vec![ ] ) ) ,
993- ( RelayLocation :: get( ) , result) . into( )
994- ) ;
995- } )
996- }
967+ #[ test]
968+ fn price_for_sibling_delivery ( ) {
969+ assert_eq ! (
970+ TypeId :: of:: <<Runtime as cumulus_pallet_xcmp_queue:: Config >:: PriceForSiblingDelivery >(
971+ ) ,
972+ TypeId :: of:: <
973+ ExponentialPrice <RelayLocation , BaseDeliveryFee , TransactionByteFee , XcmpQueue >,
974+ >( )
975+ ) ;
976+
977+ new_test_ext ( ) . execute_with ( || {
978+ type ExponentialDeliveryPrice =
979+ ExponentialPrice < RelayLocation , BaseDeliveryFee , TransactionByteFee , XcmpQueue > ;
980+ let id: ParaId = 420 . into ( ) ;
981+ let b: u128 = BaseDeliveryFee :: get ( ) ;
982+ let m: u128 = TransactionByteFee :: get ( ) ;
983+
984+ // F * (B + msg_length * M)
985+ // A: RelayLocation
986+ // B: BaseDeliveryFee
987+ // M: TransactionByteFee
988+ // F: XcmpQueue
989+ //
990+ // message_length = 1
991+ let result: u128 = XcmpQueue :: get_fee_factor ( id) . saturating_mul_int ( b + m) ;
992+ assert_eq ! (
993+ ExponentialDeliveryPrice :: price_for_delivery( id, & Xcm ( vec![ ] ) ) ,
994+ ( RelayLocation :: get( ) , result) . into( )
995+ ) ;
996+ } )
997+ }
997998
998999 #[ test]
9991000 fn versions_xcm ( ) {
0 commit comments