mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
Add more XCM tracing (#4211)
* add more logging to currency adapter * add more logging to barriers * reformat currency adapter trace logs * add tracing logs for filter asset location * add tracing logs to fungibles adapter * add tracing to origin conversion * add tracing logs for xcm weight trading * fix compile errors * add more tracing logs to xcm executor * formatting and compile fixes * add some tracing logs to pallet-xcm * adjust log target in executor to debug * fix closure args
This commit is contained in:
@@ -123,6 +123,11 @@ impl<
|
||||
from: &MultiLocation,
|
||||
to: &MultiLocation,
|
||||
) -> result::Result<xcm_executor::Assets, XcmError> {
|
||||
log::trace!(
|
||||
target: "xcm::fungibles_adapter",
|
||||
"transfer_asset what: {:?}, from: {:?}, to: {:?}",
|
||||
what, from, to
|
||||
);
|
||||
// Check we handle this asset.
|
||||
let (asset_id, amount) = Matcher::matches_fungibles(what)?;
|
||||
let source = AccountIdConverter::convert_ref(from)
|
||||
@@ -161,6 +166,11 @@ impl<
|
||||
>
|
||||
{
|
||||
fn can_check_in(_origin: &MultiLocation, what: &MultiAsset) -> Result {
|
||||
log::trace!(
|
||||
target: "xcm::fungibles_adapter",
|
||||
"can_check_in origin: {:?}, what: {:?}",
|
||||
_origin, what
|
||||
);
|
||||
// Check we handle this asset.
|
||||
let (asset_id, amount) = Matcher::matches_fungibles(what)?;
|
||||
if CheckAsset::contains(&asset_id) {
|
||||
@@ -174,6 +184,11 @@ impl<
|
||||
}
|
||||
|
||||
fn check_in(_origin: &MultiLocation, what: &MultiAsset) {
|
||||
log::trace!(
|
||||
target: "xcm::fungibles_adapter",
|
||||
"check_in origin: {:?}, what: {:?}",
|
||||
_origin, what
|
||||
);
|
||||
if let Ok((asset_id, amount)) = Matcher::matches_fungibles(what) {
|
||||
if CheckAsset::contains(&asset_id) {
|
||||
let checking_account = CheckingAccount::get();
|
||||
@@ -187,6 +202,11 @@ impl<
|
||||
}
|
||||
|
||||
fn check_out(_dest: &MultiLocation, what: &MultiAsset) {
|
||||
log::trace!(
|
||||
target: "xcm::fungibles_adapter",
|
||||
"check_out dest: {:?}, what: {:?}",
|
||||
_dest, what
|
||||
);
|
||||
if let Ok((asset_id, amount)) = Matcher::matches_fungibles(what) {
|
||||
if CheckAsset::contains(&asset_id) {
|
||||
let checking_account = CheckingAccount::get();
|
||||
@@ -197,6 +217,11 @@ impl<
|
||||
}
|
||||
|
||||
fn deposit_asset(what: &MultiAsset, who: &MultiLocation) -> Result {
|
||||
log::trace!(
|
||||
target: "xcm::fungibles_adapter",
|
||||
"deposit_asset what: {:?}, who: {:?}",
|
||||
what, who,
|
||||
);
|
||||
// Check we handle this asset.
|
||||
let (asset_id, amount) = Matcher::matches_fungibles(what)?;
|
||||
let who = AccountIdConverter::convert_ref(who)
|
||||
@@ -209,6 +234,11 @@ impl<
|
||||
what: &MultiAsset,
|
||||
who: &MultiLocation,
|
||||
) -> result::Result<xcm_executor::Assets, XcmError> {
|
||||
log::trace!(
|
||||
target: "xcm::fungibles_adapter",
|
||||
"withdraw_asset what: {:?}, who: {:?}",
|
||||
what, who,
|
||||
);
|
||||
// Check we handle this asset.
|
||||
let (asset_id, amount) = Matcher::matches_fungibles(what)?;
|
||||
let who = AccountIdConverter::convert_ref(who)
|
||||
|
||||
Reference in New Issue
Block a user