mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 12:11:09 +00:00
[Runtime] Bound XCMP queue (#2302)
Remove `without_storage_info` from the XCMP queue pallet. Part of https://github.com/paritytech/polkadot-sdk/issues/323 Changes: - Limit the number of channels that can be suspended at the same time. - Limit the number of channels that can have messages or signals pending at the same time. A No-OP migration is put in place to ensure that all `BoundedVec`s still decode and not truncate after upgrade. The storage version is thereby bumped to 4 to have our tooling remind us to deploy that migration. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a664908304
commit
b8f55d1b76
@@ -64,6 +64,8 @@ pub enum MessageSendError {
|
||||
TooBig,
|
||||
/// Some other error.
|
||||
Other,
|
||||
/// There are too many channels open at once.
|
||||
TooManyChannels,
|
||||
}
|
||||
|
||||
impl From<MessageSendError> for &'static str {
|
||||
@@ -74,6 +76,7 @@ impl From<MessageSendError> for &'static str {
|
||||
NoChannel => "NoChannel",
|
||||
TooBig => "TooBig",
|
||||
Other => "Other",
|
||||
TooManyChannels => "TooManyChannels",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,6 +138,11 @@ pub trait GetChannelInfo {
|
||||
fn get_channel_info(id: ParaId) -> Option<ChannelInfo>;
|
||||
}
|
||||
|
||||
/// List all open outgoing channels.
|
||||
pub trait ListChannelInfos {
|
||||
fn outgoing_channels() -> Vec<ParaId>;
|
||||
}
|
||||
|
||||
/// Something that should be called when sending an upward message.
|
||||
pub trait UpwardMessageSender {
|
||||
/// Send the given UMP message; return the expected number of blocks before the message will
|
||||
|
||||
Reference in New Issue
Block a user