mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 00:48:01 +00:00
Fix XCM encoding in HRMP pallet. (#2491)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user