mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 13:31:10 +00:00
Use new MultiLocation syntax everywhere (#570)
* Use new MultiLocation syntax everywhere * Make tests compile
This commit is contained in:
@@ -351,7 +351,7 @@ impl<T: Config> Pallet<T> {
|
||||
log::debug!("Processing XCMP-XCM: {:?}", &hash);
|
||||
let (result, event) = match Xcm::<T::Call>::try_from(xcm) {
|
||||
Ok(xcm) => {
|
||||
let location = (Parent, Parachain(sender.into()));
|
||||
let location = (1, Parachain(sender.into()));
|
||||
match T::XcmExecutor::execute_xcm(location.into(), xcm, max_weight) {
|
||||
Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)),
|
||||
Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))),
|
||||
@@ -777,7 +777,7 @@ impl<T: Config> SendXcm for Pallet<T> {
|
||||
fn send_xcm(dest: MultiLocation, msg: Xcm<()>) -> Result<(), XcmError> {
|
||||
match &dest {
|
||||
// An HRMP message for a sibling parachain.
|
||||
X2(Parent, Parachain(id)) => {
|
||||
MultiLocation { parents: 1, interior: X1(Parachain(id)) } => {
|
||||
let versioned_xcm = T::VersionWrapper::wrap_version(&dest, msg)
|
||||
.map_err(|()| XcmError::DestinationUnsupported)?;
|
||||
let hash = T::Hashing::hash_of(&versioned_xcm);
|
||||
|
||||
@@ -104,8 +104,8 @@ impl cumulus_pallet_parachain_system::Config for Test {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const RelayChain: MultiLocation = X1(Parent);
|
||||
pub Ancestry: MultiLocation = X1(Parachain(1u32.into()));
|
||||
pub const RelayChain: MultiLocation = MultiLocation::parent();
|
||||
pub Ancestry: MultiLocation = X1(Parachain(1u32.into())).into();
|
||||
pub UnitWeightCost: Weight = 1_000_000;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user