From cdf8fd94d3ad69aedc63517d58c5a6f1bbd1e2e9 Mon Sep 17 00:00:00 2001
From: Gavin Wood <gavin@parity.io>
Date: Fri, 30 Apr 2021 15:17:21 +0200
Subject: [PATCH] Fix condition (#424)

Closes #419
---
 cumulus/pallets/xcmp-queue/src/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cumulus/pallets/xcmp-queue/src/lib.rs b/cumulus/pallets/xcmp-queue/src/lib.rs
index 13b05cde77e..82b58e79ed4 100644
--- a/cumulus/pallets/xcmp-queue/src/lib.rs
+++ b/cumulus/pallets/xcmp-queue/src/lib.rs
@@ -457,7 +457,7 @@ impl<T: Config> Module<T> {
 		// send more, heavier messages.
 
 		let mut shuffle_index = 0;
-		while shuffle_index < shuffled.len() && max_weight.saturating_sub(weight_used) < threshold_weight {
+		while shuffle_index < shuffled.len() && max_weight.saturating_sub(weight_used) >= threshold_weight {
 			let index = shuffled[shuffle_index];
 			let sender = status[index].0;
 
-- 
GitLab