Skip to content

Commit

Permalink
added logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayevbeosa Iyamu committed Oct 3, 2024
1 parent 6aa4816 commit 6a3e140
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion polkadot/xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ impl<T: Config> Pallet<T> {
// BuyExecution happens after receiving all `assets`
let reanchored_fees =
fees.reanchored(&dest, &context).map_err(|e| {
log::error!(target: "xcm::pallet_xcm::add_fees_to_xcm", "Failed to re-anchor fees: {:?}", e);
log::error!(target: "xcm::pallet_xcm::add_fees_to_xcm", "Failed to re-anchor fees: {:?} for dest: {:?} and context {:?}", e, dest, context);
Error::<T>::CannotReanchor
})?;
// buy execution using `fees` batched together with above `reanchored_assets`
Expand Down
5 changes: 4 additions & 1 deletion polkadot/xcm/xcm-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,10 @@ impl<Config: config::Config> XcmExecutor<Config> {
let assets_taken_from_holding_to_pay_delivery_fees = self
.holding
.try_take(asset_to_pay_for_fees.clone().into())
.map_err(|_| XcmError::NotHoldingFees)?;
.map_err(|e| {
log::error!(target: "xcm::xcm_executor::take_fee", "Failed to take fees {:?} from holding. {:?}", fee, e);
XcmError::NotHoldingFees
})?;
tracing::trace!(target: "xcm::fees", ?assets_taken_from_holding_to_pay_delivery_fees);
let mut iter = assets_taken_from_holding_to_pay_delivery_fees.fungible_assets_iter();
let asset = iter.next().ok_or(XcmError::NotHoldingFees)?;
Expand Down

0 comments on commit 6a3e140

Please sign in to comment.