Companion for polkadot#7234 (XCM: Tools for uniquely referencing messages) (#2601)

* Fixes for new API

* Formatting

* Fixes

* Fixes

* Further fixes

* XCMP dispatch events mention message ID

* XCMP event includes ID

* Add DMP message ID functionality

* Integrate into test parachains

* Remove WithUniqueTopic usage

* Use new primitive

* Formatting

* undiener

* Revert lock

* Fixes

* Fixes

* Fixes

* Fixes

* Formatting

* message_hash becomes message_id

* Rename

* Another Rename

* Fixes

* Fix

* Bump

* Fixes

* Grumble.
This commit is contained in:
Gavin Wood
2023-05-25 16:52:38 +01:00
committed by GitHub
parent febea66397
commit ec21c0a24d
23 changed files with 431 additions and 569 deletions
@@ -258,7 +258,7 @@ impl<XcmConfig: xcm_executor::Config> RuntimeHelper<XcmConfig> {
&to,
// We aren't able to track the XCM that initiated the fee deposit, so we create a
// fake message hash here
&XcmContext::with_message_hash([0; 32]),
&XcmContext::with_message_id([0; 32]),
)
}
}
@@ -344,7 +344,7 @@ impl<Runtime: frame_system::Config + pallet_xcm::Config> RuntimeHelper<Runtime>
.into_iter()
.filter_map(|e| unwrap_pallet_xcm_event(e.event.encode()))
.find_map(|e| match e {
pallet_xcm::Event::Attempted(outcome) => Some(outcome),
pallet_xcm::Event::Attempted { outcome } => Some(outcome),
_ => None,
})
.expect("No `pallet_xcm::Event::Attempted(outcome)` event found!");
@@ -363,7 +363,8 @@ impl<Runtime: frame_system::Config + cumulus_pallet_xcmp_queue::Config> RuntimeH
.into_iter()
.filter_map(|e| unwrap_xcmp_queue_event(e.event.encode()))
.find_map(|e| match e {
cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => message_hash,
cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { message_hash } =>
Some(message_hash),
_ => None,
})
}