Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions polkadot/xcm/src/v4/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1320,12 +1320,14 @@ impl<Call: Decode + GetDispatchInfo> TryFrom<NewInstruction<Call>> for Instructi
let require_weight_at_most = match call.take_decoded() {
Ok(decoded) => decoded.get_dispatch_info().call_weight,
Err(error) => {
let fallback_weight = fallback_max_weight.unwrap_or(Weight::MAX);
log::error!(
target: "xcm::versions::v5Tov4",
"Couldn't decode call in Transact: {:?}, using fallback weight.",
"Couldn't decode call in Transact: {:?}, using fallback weight: {:?}",
error,
fallback_weight,
);
fallback_max_weight.unwrap_or(Weight::MAX)
fallback_weight
},
};
Self::Transact { origin_kind, require_weight_at_most, call: call.into() }
Expand Down