mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +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
@@ -30,7 +30,7 @@
|
||||
use codec::{Decode, Encode};
|
||||
use cumulus_primitives_core::{
|
||||
relay_chain, AbridgedHostConfiguration, ChannelInfo, ChannelStatus, CollationInfo,
|
||||
GetChannelInfo, InboundDownwardMessage, InboundHrmpMessage, MessageSendError,
|
||||
GetChannelInfo, InboundDownwardMessage, InboundHrmpMessage, ListChannelInfos, MessageSendError,
|
||||
OutboundHrmpMessage, ParaId, PersistedValidationData, UpwardMessage, UpwardMessageSender,
|
||||
XcmpMessageHandler, XcmpMessageSource,
|
||||
};
|
||||
@@ -1023,6 +1023,13 @@ impl<T: Config> FeeTracker for Pallet<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config> ListChannelInfos for Pallet<T> {
|
||||
fn outgoing_channels() -> Vec<ParaId> {
|
||||
let Some(state) = Self::relevant_messaging_state() else { return Vec::new() };
|
||||
state.egress_channels.into_iter().map(|(id, _)| id).collect()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config> GetChannelInfo for Pallet<T> {
|
||||
fn get_channel_status(id: ParaId) -> ChannelStatus {
|
||||
// Note, that we are using `relevant_messaging_state` which may be from the previous
|
||||
|
||||
Reference in New Issue
Block a user