mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
Fix xcmp message processing condition. (#510)
* Fix xcmp message processing condition. * add a very simple test * Update Cargo.lock * remove comment * remove comment Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com>
This commit is contained in:
@@ -25,6 +25,12 @@
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
#[cfg(test)]
|
||||
mod mock;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
use codec::{Decode, Encode};
|
||||
use cumulus_primitives_core::{
|
||||
relay_chain::BlockNumber as RelayBlockNumber, ChannelStatus, GetChannelInfo, MessageSendError,
|
||||
@@ -203,7 +209,7 @@ pub enum ChannelSignal {
|
||||
}
|
||||
|
||||
/// The aggregate XCMP message format.
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)]
|
||||
pub enum XcmpMessageFormat {
|
||||
/// Encoded `VersionedXcm` messages, all concatenated.
|
||||
ConcatenatedVersionedXcm,
|
||||
@@ -552,7 +558,7 @@ impl<T: Config> Pallet<T> {
|
||||
// If there are more and we're making progress, we process them after we've given the
|
||||
// other channels a look in. If we've still not unlocked all weight, then we set them
|
||||
// up for processing a second time anyway.
|
||||
if !status[index].2.is_empty() && weight_processed > 0 || weight_available != max_weight
|
||||
if !status[index].2.is_empty() && (weight_processed > 0 || weight_available != max_weight)
|
||||
{
|
||||
if shuffle_index + 1 == shuffled.len() {
|
||||
// Only this queue left. Just run around this loop once more.
|
||||
|
||||
Reference in New Issue
Block a user