mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
UMP: Support Overweight messages (#3575)
* Introduce new config: ump_max_individual_weight * Implement overweight msg stashing * Test * Add migration module. Also introduces a test for migration * Integrate ExecuteOverweightOrigin to runtimes * Fix more stuff * Add `yeet` into dictionary * Use suggested `Error` variant names * typo * Use 20ms as the maximum individual message weight * Update the test value * rustfmt * Clean up * Remove deprecated field from host config * Remove missed _hrmp_open_request_ttl * Apply typo fix suggestion Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Rename `migration::migrate_to_latest` * Restore `_hrmp_open_request_ttl` in `v0::HostConfiguration` * Apply suggestion for a rustdoc * Apply the suggestion * Test v0 config with the raw production data fetched from Kusama * Update runtime/parachains/src/ump.rs Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Expose migration functions * Fix spellcheck Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -133,6 +133,7 @@ impl crate::ump::Config for Test {
|
||||
type Event = Event;
|
||||
type UmpSink = TestUmpSink;
|
||||
type FirstMessageFactorPercent = FirstMessageFactorPercent;
|
||||
type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
|
||||
}
|
||||
|
||||
impl crate::hrmp::Config for Test {
|
||||
@@ -309,3 +310,11 @@ pub struct MockGenesisConfig {
|
||||
pub configuration: crate::configuration::GenesisConfig<Test>,
|
||||
pub paras: crate::paras::GenesisConfig,
|
||||
}
|
||||
|
||||
pub fn assert_last_event(generic_event: Event) {
|
||||
let events = frame_system::Pallet::<Test>::events();
|
||||
let system_event: <Test as frame_system::Config>::Event = generic_event.into();
|
||||
// compare to the last event record
|
||||
let frame_system::EventRecord { event, .. } = &events[events.len() - 1];
|
||||
assert_eq!(event, &system_event);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user