Skip to content

Commit 0be8e8f

Browse files
apopiakgavofyork
andauthored
Backport Fix use of weight limit errors (paritytech#791) (paritytech#795) (paritytech#798)
* Fix use of weight limit errors (paritytech#791) * cargo +nightly fmt Co-authored-by: Gavin Wood <[email protected]> Co-authored-by: Gavin Wood <[email protected]>
1 parent 226757b commit 0be8e8f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pallets/xcmp-queue/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ impl<T: Config> Pallet<T> {
382382
let weight = max_weight - weight_used;
383383
match Self::handle_xcm_message(sender, sent_at, xcm, weight) {
384384
Ok(used) => weight_used = weight_used.saturating_add(used),
385-
Err(XcmError::TooMuchWeightRequired) => {
385+
Err(XcmError::WeightLimitReached(required))
386+
if required <= max_weight =>
387+
{
386388
// That message didn't get processed this time because of being
387389
// too heavy. We leave it around for next time and bail.
388390
remaining_fragments = last_remaining_fragments;

0 commit comments

Comments
 (0)