From 42c18b8cb552f9c11e648f2d9796f8d6311599da Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Fri, 30 Apr 2021 15:17:21 +0200 Subject: [PATCH] Fix condition (#424) Closes #419 --- pallets/xcmp-queue/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 13b05cde77..82b58e79ed 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -457,7 +457,7 @@ impl Module { // 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;