Skip to content
Snippets Groups Projects
Unverified Commit 3fb99c0b authored by Branislav Kontur's avatar Branislav Kontur Committed by GitHub
Browse files

Add fallback_weight to the log (#6782)


Co-authored-by: default avatarFrancisco Aguirre <franciscoaguirreperez@gmail.com>
parent 4fc92486
No related merge requests found
Pipeline #508767 waiting for manual action with stages
in 47 minutes and 48 seconds
......@@ -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) => {
log::error!(
let fallback_weight = fallback_max_weight.unwrap_or(Weight::MAX);
log::debug!(
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() }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment