Ensure max_weight is assigned properly in AllowTopPaidExecutionFrom (#6787)

This commit is contained in:
Keith Yeung
2023-02-25 10:37:56 -05:00
committed by GitHub
parent 92ee0b7d9f
commit 3df2893bae
+1 -1
View File
@@ -94,7 +94,7 @@ impl<T: Contains<MultiLocation>> 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 => {