Skip to content

Commit

Permalink
xcm-emlator: Use BlockNumberFor instead of `parachains_common::Bloc…
Browse files Browse the repository at this point in the history
…kNumber=u32` (#4434) (#4493)

Cherry-picked from `master` (#4434). Context:
#4428.

I don't see any other way than opening other PRs for each of the
released branches with this fix. If you guys have an alternative
proposal, I am all ears. Otherwise, I'll go ahead and open the other
ones once this gets merged.

Co-authored-by: Branislav Kontur <[email protected]>
  • Loading branch information
ntn-x2 and bkontur authored May 17, 2024
1 parent f0ab54e commit 72dd732
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cumulus/xcm/xcm-emulator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ pub use frame_support::{
},
weights::{Weight, WeightMeter},
};
pub use frame_system::{Config as SystemConfig, Pallet as SystemPallet};
pub use frame_system::{
pallet_prelude::BlockNumberFor, Config as SystemConfig, Pallet as SystemPallet,
};
pub use pallet_balances::AccountData;
pub use sp_arithmetic::traits::Bounded;
pub use sp_core::{blake2_256, parameter_types, sr25519, storage::Storage, Pair};
Expand All @@ -49,7 +51,7 @@ pub use cumulus_primitives_core::{
pub use cumulus_primitives_parachain_inherent::ParachainInherentData;
pub use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
pub use pallet_message_queue::{Config as MessageQueueConfig, Pallet as MessageQueuePallet};
pub use parachains_common::{AccountId, Balance, BlockNumber};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_primitives;
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};

Expand Down Expand Up @@ -643,7 +645,7 @@ macro_rules! decl_test_parachains {
.clone()
);
<Self as Chain>::System::initialize(&block_number, &parent_head_data.hash(), &Default::default());
<<Self as Parachain>::ParachainSystem as Hooks<$crate::BlockNumber>>::on_initialize(block_number);
<<Self as Parachain>::ParachainSystem as Hooks<$crate::BlockNumberFor<Self::Runtime>>>::on_initialize(block_number);

let _ = <Self as Parachain>::ParachainSystem::set_validation_data(
<Self as Chain>::RuntimeOrigin::none(),
Expand Down

0 comments on commit 72dd732

Please sign in to comment.