This commit is contained in:
Keith Yeung
2022-03-10 21:21:34 -08:00
parent 3fb3bb9b25
commit 005d37a1d4
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ pub mod pallet {
Ok(0)
},
Ok(Ok(x)) => {
let outcome = T::XcmExecutor::execute_xcm(Parent, x, limit);
let outcome = T::XcmExecutor::execute_xcm(Parent, x, id, limit);
match outcome {
Outcome::Error(XcmError::WeightLimitReached(required)) =>
Err((id, required)),
+5 -5
View File
@@ -45,18 +45,18 @@ impl<T: UpwardMessageSender, W: WrapVersion> SendXcm for ParentAsUmp<T, W> {
if d.contains_parents_only(1) {
// An upward message for the relay chain.
let versioned_xcm =
W::wrap_version(&d, msg).map_err(|()| SendError::DestinationUnsupported)?;
W::wrap_version(&d, xcm).map_err(|()| SendError::DestinationUnsupported)?;
let data = versioned_xcm.encode();
Ok(data, MultiAssets::new())
Ok((data, MultiAssets::new()))
} else {
*dest = Some(d.clone());
*dest = Some(d);
// Anything else is unhandled. This includes a message this is meant for us.
Err(SendError::NotApplicable(d, xcm))
Err(SendError::NotApplicable)
}
}
fn deliver(blob: Vec<u8>) -> Result<XcmHash, SendError> {
fn deliver(data: Vec<u8>) -> Result<XcmHash, SendError> {
let hash = data.using_encoded(sp_io::hashing::blake2_256);
T::send_upward_message(data).map_err(|e| match e {