Fix HRMP Sibling Location (#318)

* Fix HRMP Location

* Add call to xcm handler
This commit is contained in:
Shawn Tabrizi
2021-02-08 09:09:50 -04:00
committed by GitHub
parent 309bc92b78
commit b32ce07176
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ construct_runtime! {
ParachainSystem: cumulus_parachain_system::{Module, Call, Storage, Inherent, Event},
TransactionPayment: pallet_transaction_payment::{Module, Storage},
ParachainInfo: parachain_info::{Module, Storage, Config},
XcmHandler: xcm_handler::{Module, Event<T>, Origin},
XcmHandler: xcm_handler::{Module, Call, Event<T>, Origin},
}
}
+5 -4
View File
@@ -122,10 +122,11 @@ impl<T: Config> HrmpMessageHandler for Module<T> {
frame_support::debug::print!("Processing HRMP XCM: {:?}", &hash);
match VersionedXcm::decode(&mut &msg.data[..]).map(Xcm::try_from) {
Ok(Ok(xcm)) => {
match T::XcmExecutor::execute_xcm(
Junction::Parachain { id: sender.into() }.into(),
xcm,
) {
let location = (
Junction::Parent,
Junction::Parachain { id: sender.into() },
);
match T::XcmExecutor::execute_xcm(location.into(), xcm) {
Ok(..) => RawEvent::Success(hash),
Err(e) => RawEvent::Fail(hash, e),
};