From e8669aeff8a4ce1ef2208ad37bed3d9e7c96777a Mon Sep 17 00:00:00 2001 From: Gavin Wood Date: Wed, 24 Nov 2021 13:26:45 +0100 Subject: [PATCH] Fix use of weight limit errors (#791) --- 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 378bfe383e..92d8bb2b7e 100644 --- a/cumulus/pallets/xcmp-queue/src/lib.rs +++ b/cumulus/pallets/xcmp-queue/src/lib.rs @@ -382,7 +382,7 @@ impl Pallet { let weight = max_weight - weight_used; match Self::handle_xcm_message(sender, sent_at, xcm, weight) { Ok(used) => weight_used = weight_used.saturating_add(used), - Err(XcmError::TooMuchWeightRequired) => { + Err(XcmError::WeightLimitReached(required)) if required <= max_weight => { // That message didn't get processed this time because of being // too heavy. We leave it around for next time and bail. remaining_fragments = last_remaining_fragments;