Required weight is returned in case it exceeds limit. (#2952)

This commit is contained in:
Gavin Wood
2021-04-28 18:24:39 +02:00
committed by GitHub
parent 9c60982989
commit c0bf7e3d8c
4 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ impl<XcmExecutor: xcm::v0::ExecuteXcm<Call>, Call> UmpSink for XcmSink<XcmExecut
let xcm_location: MultiLocation = xcm_junction.into();
match XcmExecutor::execute_xcm(xcm_location, xcm_message, max_weight) {
Outcome::Complete(w) | Outcome::Incomplete(w, _) => Some(w),
Outcome::Error(XcmError::WeightLimitReached) => None,
Outcome::Error(XcmError::WeightLimitReached(..)) => None,
Outcome::Error(_) => Some(0),
}
}