Unverified Commit cb95b9a3 authored by Shaun Wang's avatar Shaun Wang Committed by GitHub
Browse files

Fix XCM encoding in HRMP pallet. (#2491)

parent 79710543
Pipeline #125177 passed with stages
in 35 minutes and 55 seconds
......@@ -934,14 +934,14 @@ impl<T: Config> Module<T> {
<Self as Store>::HrmpOpenChannelRequestsList::append(channel_id);
let notification_bytes = {
use xcm::v0::Xcm;
use xcm::{v0::Xcm, VersionedXcm};
use parity_scale_codec::Encode as _;
Xcm::HrmpNewChannelOpenRequest {
VersionedXcm::from(Xcm::HrmpNewChannelOpenRequest {
sender: u32::from(origin),
max_capacity: proposed_max_capacity,
max_message_size: proposed_max_message_size,
}
})
.encode()
};
if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) =
......@@ -1000,11 +1000,11 @@ impl<T: Config> Module<T> {
let notification_bytes = {
use parity_scale_codec::Encode as _;
use xcm::v0::Xcm;
use xcm::{v0::Xcm, VersionedXcm};
Xcm::HrmpChannelAccepted {
VersionedXcm::from(Xcm::HrmpChannelAccepted {
recipient: u32::from(origin),
}
})
.encode()
};
if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) =
......@@ -1043,13 +1043,13 @@ impl<T: Config> Module<T> {
let config = <configuration::Module<T>>::config();
let notification_bytes = {
use parity_scale_codec::Encode as _;
use xcm::v0::Xcm;
use xcm::{v0::Xcm, VersionedXcm};
Xcm::HrmpChannelClosing {
VersionedXcm::from(Xcm::HrmpChannelClosing {
initiator: u32::from(origin),
sender: u32::from(channel_id.sender),
recipient: u32::from(channel_id.recipient),
}
})
.encode()
};
let opposite_party = if origin == channel_id.sender {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment