Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Companion for #11981 #5915

Merged
merged 55 commits into from
Sep 12, 2022
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
b839c2a
Companion for #11981
Szegoo Aug 22, 2022
8b5cf18
more renaming
Szegoo Aug 22, 2022
aa3d405
fmt
Szegoo Aug 22, 2022
5103db1
fixes
Szegoo Aug 22, 2022
6e57d6f
add generic type
Szegoo Aug 22, 2022
f314d54
Companion for #11831
Szegoo Jul 16, 2022
a681bee
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Aug 23, 2022
418dc9e
fix
Szegoo Aug 23, 2022
0cac730
revert changes
Szegoo Aug 25, 2022
4661fd3
Delete rename-outer-enum.diff
Szegoo Aug 25, 2022
e54d8fa
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Aug 25, 2022
b65102b
revert
Szegoo Aug 25, 2022
edb2496
Update run_benches_for_runtime.sh
Szegoo Aug 25, 2022
c359f5f
rename type Call & type Event
Szegoo Aug 25, 2022
7821347
passing tests
Szegoo Aug 25, 2022
6bba1ed
fmt
Szegoo Aug 25, 2022
1670083
small fixes
Szegoo Aug 25, 2022
a2756b5
commit
Szegoo Aug 26, 2022
1cac521
fix
Szegoo Aug 27, 2022
3d1306d
fmt
Szegoo Aug 27, 2022
ab62e87
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Aug 27, 2022
37d2b2d
commit
Szegoo Aug 27, 2022
afd2386
error fixes
Szegoo Aug 28, 2022
28d87c2
fix
Szegoo Aug 28, 2022
122baa8
Merge branch 'master' into rename-outer-enum
Szegoo Aug 28, 2022
595752f
small fix in test
Szegoo Aug 28, 2022
f9887a6
Merge branch 'master' into rename-outer-enum
Szegoo Aug 31, 2022
dff2859
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 1, 2022
e46b8a0
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 1, 2022
d3685eb
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 2, 2022
5dbcf5d
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 2, 2022
c270e37
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 3, 2022
5ef784f
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 5, 2022
b1f2122
Update lib.rs
Szegoo Sep 5, 2022
1b3b37c
Update lib.rs
Szegoo Sep 5, 2022
acf1cca
Update lib.rs
Szegoo Sep 5, 2022
9746310
Update lib.rs
Szegoo Sep 5, 2022
334e3dc
Update lib.rs
Szegoo Sep 5, 2022
8c0346b
Update lib.rs
Szegoo Sep 5, 2022
bb203a9
Update lib.rs
Szegoo Sep 5, 2022
7792686
remove RuntimeCall from pallet_grandpa
Szegoo Sep 5, 2022
8ec5738
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 6, 2022
ca46f19
last fix
Szegoo Sep 6, 2022
7a501b8
commit
Szegoo Sep 6, 2022
381f105
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 6, 2022
15b47e8
rename
Szegoo Sep 8, 2022
e2bfea2
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 8, 2022
10f2191
Merge branch 'master' into rename-outer-enum
Szegoo Sep 9, 2022
d29b550
merge fix
Szegoo Sep 9, 2022
0f3c48a
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 9, 2022
4d24a49
Merge branch 'master' into rename-outer-enum
Szegoo Sep 10, 2022
50fc84d
Merge branch 'paritytech:master' into rename-outer-enum
Szegoo Sep 12, 2022
1d578a3
update lockfile for {"substrate"}
Sep 12, 2022
e021194
cargo +nightly fmt
shawntabrizi Sep 12, 2022
50d9a7c
fix
shawntabrizi Sep 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fmt
Szegoo committed Aug 22, 2022
commit aa3d405ff211804c9bc29a3ca1844cda918e6023
3 changes: 2 additions & 1 deletion node/overseer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -190,7 +190,8 @@ impl Handle {

/// Send some message to one of the `Subsystem`s.
pub async fn send_msg(&mut self, msg: impl Into<AllMessages>, origin: &'static str) {
self.send_and_log_error(PalletEvent::MsgToSubsystem { msg: msg.into(), origin }).await
self.send_and_log_error(PalletEvent::MsgToSubsystem { msg: msg.into(), origin })
.await
}

/// Send a message not providing an origin.
3 changes: 2 additions & 1 deletion runtime/common/src/assigned_slots.rs
Original file line number Diff line number Diff line change
@@ -85,7 +85,8 @@ pub mod pallet {
#[pallet::disable_frame_system_supertrait_check]
pub trait Config: configuration::Config + paras::Config + slots::Config {
/// The overarching PalletEvent type.
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// Origin for assigning slots.
type AssignSlotOrigin: EnsureOrigin<<Self as frame_system::Config>::Origin>;
3 changes: 2 additions & 1 deletion runtime/common/src/auctions.rs
Original file line number Diff line number Diff line change
@@ -91,7 +91,8 @@ pub mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config {
/// The overarching event type.
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The type representing the leasing system.
type Leaser: Leaser<
3 changes: 2 additions & 1 deletion runtime/common/src/claims.rs
Original file line number Diff line number Diff line change
@@ -172,7 +172,8 @@ pub mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config {
/// The overarching event type.
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
type VestingSchedule: VestingSchedule<Self::AccountId, Moment = Self::BlockNumber>;
#[pallet::constant]
type Prefix: Get<&'static [u8]>;
20 changes: 16 additions & 4 deletions runtime/common/src/crowdloan/mod.rs
Original file line number Diff line number Diff line change
@@ -189,7 +189,8 @@ pub mod pallet {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")`
#[pallet::constant]
@@ -494,7 +495,11 @@ pub mod pallet {

Funds::<T>::insert(index, &fund);

Self::deposit_event(PalletEvent::<T>::Withdrew { who, fund_index: index, amount: balance });
Self::deposit_event(PalletEvent::<T>::Withdrew {
who,
fund_index: index,
amount: balance,
});
Ok(())
}

@@ -811,7 +816,11 @@ impl<T: Config> Pallet<T> {

Funds::<T>::insert(index, &fund);

Self::deposit_event(PalletEvent::<T>::Contributed { who, fund_index: index, amount: value });
Self::deposit_event(PalletEvent::<T>::Contributed {
who,
fund_index: index,
amount: value,
});
Ok(())
}
}
@@ -1659,7 +1668,10 @@ mod tests {

// Call again
assert_ok!(Crowdloan::refund(Origin::signed(1337), para));
assert_eq!(last_event(), super::PalletEvent::<Test>::AllRefunded { para_id: para }.into());
assert_eq!(
last_event(),
super::PalletEvent::<Test>::AllRefunded { para_id: para }.into()
);

// Funds are returned
assert_eq!(Balances::free_balance(account_id), 0);
3 changes: 2 additions & 1 deletion runtime/common/src/paras_registrar.rs
Original file line number Diff line number Diff line change
@@ -96,7 +96,8 @@ pub mod pallet {
#[pallet::disable_frame_system_supertrait_check]
pub trait Config: configuration::Config + paras::Config {
/// The overarching event type.
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The aggregated origin type must support the `parachains` origin. We require that we can
/// infallibly convert between this origin and the system origin, but in reality, they're the
7 changes: 5 additions & 2 deletions runtime/common/src/purchase.rs
Original file line number Diff line number Diff line change
@@ -98,7 +98,8 @@ pub mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config {
/// The overarching event type.
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// Balances Pallet
type Currency: Currency<Self::AccountId>;
@@ -406,7 +407,9 @@ pub mod pallet {
);
// Possibly this is worse than having the caller account be the payment account?
UnlockBlock::<T>::set(unlock_block);
Self::deposit_event(PalletEvent::<T>::UnlockBlockUpdated { block_number: unlock_block });
Self::deposit_event(PalletEvent::<T>::UnlockBlockUpdated {
block_number: unlock_block,
});
Ok(())
}
}
3 changes: 2 additions & 1 deletion runtime/common/src/slots/mod.rs
Original file line number Diff line number Diff line change
@@ -74,7 +74,8 @@ pub mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config {
/// The overarching event type.
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// The currency type used for bidding.
type Currency: ReservableCurrency<Self::AccountId>;
4 changes: 2 additions & 2 deletions runtime/kusama/src/xcm_config.rs
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@
//! XCM configurations for the Kusama runtime.

use super::{
parachains_origin, AccountId, Balances, Call, CouncilCollective, RuntimeEvent, Origin, ParaId,
Runtime, WeightToFee, XcmPallet,
parachains_origin, AccountId, Balances, Call, CouncilCollective, Origin, ParaId, Runtime,
RuntimeEvent, WeightToFee, XcmPallet,
};
use frame_support::{match_types, parameter_types, traits::Everything, weights::Weight};
use runtime_common::{xcm_sender, ToAuthor};
8 changes: 6 additions & 2 deletions runtime/parachains/src/disputes.rs
Original file line number Diff line number Diff line change
@@ -410,7 +410,8 @@ pub mod pallet {

#[pallet::config]
pub trait Config: frame_system::Config + configuration::Config + session_info::Config {
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RewardValidators: RewardValidators;
type PunishValidators: PunishValidators;

@@ -1203,7 +1204,10 @@ impl<T: Config> Pallet<T> {

{
if summary.new_flags.contains(DisputeStateFlags::FOR_SUPERMAJORITY) {
Self::deposit_event(PalletEvent::DisputeConcluded(candidate_hash, DisputeResult::Valid));
Self::deposit_event(PalletEvent::DisputeConcluded(
candidate_hash,
DisputeResult::Valid,
));
}

// It is possible, although unexpected, for a dispute to conclude twice.
3 changes: 2 additions & 1 deletion runtime/parachains/src/hrmp.rs
Original file line number Diff line number Diff line change
@@ -239,7 +239,8 @@ pub mod pallet {
frame_system::Config + configuration::Config + paras::Config + dmp::Config
{
/// The outer event type.
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

type Origin: From<crate::Origin>
+ From<<Self as frame_system::Config>::Origin>
10 changes: 4 additions & 6 deletions runtime/parachains/src/hrmp/tests.rs
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

use super::*;
use crate::mock::{
new_test_ext, Configuration, PalletEvent as MockEvent, Hrmp, MockGenesisConfig, Paras, ParasShared,
System, Test,
new_test_ext, Configuration, Hrmp, MockGenesisConfig, PalletEvent as MockEvent, Paras,
ParasShared, System, Test,
};
use frame_support::{assert_noop, assert_ok, traits::Currency as _};
use primitives::v2::BlockNumber;
@@ -177,10 +177,8 @@ fn open_channel_works() {

Hrmp::hrmp_accept_open_channel(para_b_origin.into(), para_a).unwrap();
Hrmp::assert_storage_consistency_exhaustive();
assert!(System::events()
.iter()
.any(|record| record.event ==
MockEvent::Hrmp(PalletEvent::OpenChannelAccepted(para_a, para_b))));
assert!(System::events().iter().any(|record| record.event ==
MockEvent::Hrmp(PalletEvent::OpenChannelAccepted(para_a, para_b))));

// Advance to a block 6, but without session change. That means that the channel has
// not been created yet.
3 changes: 2 additions & 1 deletion runtime/parachains/src/inclusion/mod.rs
Original file line number Diff line number Diff line change
@@ -198,7 +198,8 @@ pub mod pallet {
+ hrmp::Config
+ configuration::Config
{
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
type DisputesHandler: disputes::DisputesHandler<Self::BlockNumber>;
type RewardValidators: RewardValidators;
}
8 changes: 6 additions & 2 deletions runtime/parachains/src/paras/tests.rs
Original file line number Diff line number Diff line change
@@ -112,8 +112,12 @@ fn check_code_is_not_stored(validation_code: &ValidationCode) {

/// An utility for checking that certain events were deposited.
struct EventValidator {
events:
Vec<frame_system::EventRecord<<Test as frame_system::Config>::PalletEvent, primitives::v2::Hash>>,
events: Vec<
frame_system::EventRecord<
<Test as frame_system::Config>::PalletEvent,
primitives::v2::Hash,
>,
>,
}

impl EventValidator {
4 changes: 3 additions & 1 deletion runtime/parachains/src/ump.rs
Original file line number Diff line number Diff line change
@@ -550,7 +550,9 @@ impl<T: Config> Pallet<T> {
} else {
// we process messages in order and don't drop them if we run out of weight,
// so need to break here without calling `consume_front`.
Self::deposit_event(PalletEvent::WeightExhausted(id, max_weight, required));
Self::deposit_event(PalletEvent::WeightExhausted(
id, max_weight, required,
));
break
}
},
4 changes: 2 additions & 2 deletions runtime/polkadot/src/xcm_config.rs
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@
//! XCM configuration for Polkadot.

use super::{
parachains_origin, AccountId, Balances, Call, CouncilCollective, RuntimeEvent, Origin, ParaId,
Runtime, WeightToFee, XcmPallet,
parachains_origin, AccountId, Balances, Call, CouncilCollective, Origin, ParaId, Runtime,
RuntimeEvent, WeightToFee, XcmPallet,
};
use frame_support::{
match_types, parameter_types,
3 changes: 2 additions & 1 deletion runtime/rococo/src/validator_manager.rs
Original file line number Diff line number Diff line change
@@ -37,7 +37,8 @@ pub mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config + pallet_session::Config {
/// The overreaching event type.
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// Privileged origin that can add or remove validators.
type PrivilegedOrigin: EnsureOrigin<<Self as frame_system::Config>::Origin>;
4 changes: 2 additions & 2 deletions runtime/rococo/src/xcm_config.rs
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@
//! XCM configuration for Rococo.

use super::{
parachains_origin, AccountId, Balances, Call, RuntimeEvent, Origin, ParaId, Runtime, WeightToFee,
XcmPallet,
parachains_origin, AccountId, Balances, Call, Origin, ParaId, Runtime, RuntimeEvent,
WeightToFee, XcmPallet,
};
use frame_support::{
parameter_types,
3 changes: 2 additions & 1 deletion runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
@@ -589,7 +589,8 @@ pub mod pallet_test_notifier {

#[pallet::config]
pub trait Config: frame_system::Config + pallet_xcm::Config {
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<PalletEvent<Self>>;
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent>
+ From<PalletEvent<Self>>;
type Origin: IsType<<Self as frame_system::Config>::Origin>
+ Into<Result<pallet_xcm::Origin, <Self as Config>::Origin>>;
type Call: IsType<<Self as pallet_xcm::Config>::Call> + From<Call<Self>>;
2 changes: 1 addition & 1 deletion runtime/westend/src/xcm_config.rs
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
//! XCM configurations for Westend.

use super::{
parachains_origin, weights, AccountId, Balances, Call, RuntimeEvent, Origin, ParaId, Runtime,
parachains_origin, weights, AccountId, Balances, Call, Origin, ParaId, Runtime, RuntimeEvent,
WeightToFee, XcmPallet,
};
use frame_support::{
19 changes: 14 additions & 5 deletions xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -71,7 +71,8 @@ pub mod pallet {
/// The module configuration trait.
pub trait Config: frame_system::Config {
/// The overarching event type.
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// Required origin for sending XCM messages. If successful, it resolves to `MultiLocation`
/// which exists as an interior location within this chain's XCM context.
@@ -1006,7 +1007,8 @@ pub mod pallet {
);
PalletEvent::VersionChangeNotified(new_key, xcm_version)
},
Err(e) => PalletEvent::NotifyTargetSendFail(new_key, query_id, e.into()),
Err(e) =>
PalletEvent::NotifyTargetSendFail(new_key, query_id, e.into()),
};
Self::deposit_event(event);
weight_used.saturating_accrue(todo_vnt_notify_migrate_weight);
@@ -1414,7 +1416,11 @@ pub mod pallet {
let dispatch_origin = Origin::Response(origin.clone()).into();
match call.dispatch(dispatch_origin) {
Ok(post_info) => {
let e = PalletEvent::Notified(query_id, pallet_index, call_index);
let e = PalletEvent::Notified(
query_id,
pallet_index,
call_index,
);
Self::deposit_event(e);
post_info.actual_weight
},
@@ -1432,8 +1438,11 @@ pub mod pallet {
}
.unwrap_or(weight)
} else {
let e =
PalletEvent::NotifyDecodeFailed(query_id, pallet_index, call_index);
let e = PalletEvent::NotifyDecodeFailed(
query_id,
pallet_index,
call_index,
);
Self::deposit_event(e);
0
}
3 changes: 2 additions & 1 deletion xcm/pallet-xcm/src/mock.rs
Original file line number Diff line number Diff line change
@@ -51,7 +51,8 @@ pub mod pallet_test_notifier {

#[pallet::config]
pub trait Config: frame_system::Config + crate::Config {
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<PalletEvent<Self>>;
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent>
+ From<PalletEvent<Self>>;
type Origin: IsType<<Self as frame_system::Config>::Origin>
+ Into<Result<crate::Origin, <Self as Config>::Origin>>;
type Call: IsType<<Self as crate::Config>::Call> + From<Call<Self>>;
11 changes: 9 additions & 2 deletions xcm/pallet-xcm/src/tests.rs
Original file line number Diff line number Diff line change
@@ -139,7 +139,10 @@ fn report_outcome_works() {
assert_eq!(r, Outcome::Complete(1_000));
assert_eq!(
last_event(),
PalletEvent::XcmPallet(crate::PalletEvent::ResponseReady(0, Response::ExecutionResult(None),))
PalletEvent::XcmPallet(crate::PalletEvent::ResponseReady(
0,
Response::ExecutionResult(None),
))
);

let response = Some((Response::ExecutionResult(None), 1));
@@ -551,7 +554,11 @@ fn trapped_assets_can_be_claimed() {
assert_eq!(
last_events(2),
vec![
PalletEvent::XcmPallet(crate::PalletEvent::AssetsTrapped(hash.clone(), source, vma)),
PalletEvent::XcmPallet(crate::PalletEvent::AssetsTrapped(
hash.clone(),
source,
vma
)),
PalletEvent::XcmPallet(crate::PalletEvent::Attempted(Outcome::Complete(
5 * BaseXcmWeight::get()
)))
6 changes: 3 additions & 3 deletions xcm/xcm-executor/integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -66,9 +66,9 @@ fn basic_buy_fees_message_executes() {
.inspect_state(|| {
assert!(polkadot_test_runtime::System::events().iter().any(|r| matches!(
r.event,
polkadot_test_runtime::PalletEvent::Xcm(pallet_xcm::PalletEvent::Attempted(Outcome::Complete(
_
))),
polkadot_test_runtime::PalletEvent::Xcm(pallet_xcm::PalletEvent::Attempted(
Outcome::Complete(_)
)),
)));
});
}
21 changes: 12 additions & 9 deletions xcm/xcm-simulator/example/src/lib.rs
Original file line number Diff line number Diff line change
@@ -136,9 +136,10 @@ mod tests {

ParaA::execute_with(|| {
use parachain::{Event, System};
assert!(System::events()
.iter()
.any(|r| matches!(r.event, PalletEvent::System(frame_system::PalletEvent::Remarked { .. }))));
assert!(System::events().iter().any(|r| matches!(
r.event,
PalletEvent::System(frame_system::PalletEvent::Remarked { .. })
)));
});
}

@@ -163,9 +164,10 @@ mod tests {

Relay::execute_with(|| {
use relay_chain::{Event, System};
assert!(System::events()
.iter()
.any(|r| matches!(r.event, PalletEvent::System(frame_system::PalletEvent::Remarked { .. }))));
assert!(System::events().iter().any(|r| matches!(
r.event,
PalletEvent::System(frame_system::PalletEvent::Remarked { .. })
)));
});
}

@@ -191,9 +193,10 @@ mod tests {

ParaB::execute_with(|| {
use parachain::{Event, System};
assert!(System::events()
.iter()
.any(|r| matches!(r.event, PalletEvent::System(frame_system::PalletEvent::Remarked { .. }))));
assert!(System::events().iter().any(|r| matches!(
r.event,
PalletEvent::System(frame_system::PalletEvent::Remarked { .. })
)));
});
}

6 changes: 4 additions & 2 deletions xcm/xcm-simulator/example/src/parachain.rs
Original file line number Diff line number Diff line change
@@ -156,7 +156,8 @@ pub mod mock_msg_queue {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
type XcmExecutor: ExecuteXcm<Self::Call>;
}

@@ -230,7 +231,8 @@ pub mod mock_msg_queue {
Outcome::Incomplete(w, e) => (Ok(w), PalletEvent::Fail(Some(hash), e)),
}
},
Err(()) => (Err(XcmError::UnhandledXcmVersion), PalletEvent::BadVersion(Some(hash))),
Err(()) =>
(Err(XcmError::UnhandledXcmVersion), PalletEvent::BadVersion(Some(hash))),
};
Self::deposit_event(event);
result
6 changes: 4 additions & 2 deletions xcm/xcm-simulator/fuzzer/src/parachain.rs
Original file line number Diff line number Diff line change
@@ -156,7 +156,8 @@ pub mod mock_msg_queue {

#[pallet::config]
pub trait Config: frame_system::Config {
type RuntimeEvent: From<PalletEvent<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<PalletEvent<Self>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
type XcmExecutor: ExecuteXcm<Self::Call>;
}

@@ -230,7 +231,8 @@ pub mod mock_msg_queue {
Outcome::Incomplete(w, e) => (Ok(w), PalletEvent::Fail(Some(hash), e)),
}
},
Err(()) => (Err(XcmError::UnhandledXcmVersion), PalletEvent::BadVersion(Some(hash))),
Err(()) =>
(Err(XcmError::UnhandledXcmVersion), PalletEvent::BadVersion(Some(hash))),
};
Self::deposit_event(event);
result