From 8deef133d3ca1bdea8c6267c4a66ecabb903a18b Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Sat, 25 Feb 2023 10:37:56 -0500 Subject: [PATCH] Ensure max_weight is assigned properly in AllowTopPaidExecutionFrom (#6787) --- xcm/xcm-builder/src/barriers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcm/xcm-builder/src/barriers.rs b/xcm/xcm-builder/src/barriers.rs index bdc7f6811edd..3ac275b63e26 100644 --- a/xcm/xcm-builder/src/barriers.rs +++ b/xcm/xcm-builder/src/barriers.rs @@ -94,7 +94,7 @@ impl> ShouldExecute for AllowTopLevelPaidExecutionFro BuyExecution { weight_limit: Limited(ref mut weight), .. } if weight.all_gte(max_weight) => { - *weight = weight.max(max_weight); + *weight = max_weight; Ok(()) }, BuyExecution { ref mut weight_limit, .. } if weight_limit == &Unlimited => {