This commit is contained in:
Gav Wood
2022-03-11 23:38:23 +01:00
parent 865839a180
commit 6462dd9e0d
3 changed files with 11 additions and 19 deletions
+2 -15
View File
@@ -438,23 +438,10 @@ mod tests {
fn execute(
_origin: impl Into<MultiLocation>,
_: Weightless,
message: &Xcm,
_hash: XcmHash,
weight_limit: Weight,
_weight_limit: Weight,
) -> Outcome {
let o = match (message.0.len(), &message.0.first()) {
(1, Some(Transact { require_weight_at_most, .. })) => {
if *require_weight_at_most <= weight_limit {
Outcome::Complete(*require_weight_at_most)
} else {
Outcome::Error(XcmError::WeightLimitReached(*require_weight_at_most))
}
},
// use 1000 to decide that it's not supported.
_ => Outcome::Incomplete(1000.min(weight_limit), XcmError::Unimplemented),
};
TRACE.with(|q| q.borrow_mut().push((message, o.clone())));
o
unreachable!()
}
fn charge_fees(_location: impl Into<MultiLocation>, _fees: MultiAssets) -> XcmResult {