From 2446847e5500fb3fcc3243b6cc34c2bc3322b921 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Tue, 26 Nov 2024 18:04:01 +0100 Subject: [PATCH] Adds debug trace for masp epochs in asset types --- crates/shielded_token/src/masp/shielded_wallet.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/shielded_token/src/masp/shielded_wallet.rs b/crates/shielded_token/src/masp/shielded_wallet.rs index a8b38dec27..136561ed46 100644 --- a/crates/shielded_token/src/masp/shielded_wallet.rs +++ b/crates/shielded_token/src/masp/shielded_wallet.rs @@ -472,6 +472,11 @@ pub trait ShieldedApi: ) -> Option { // Try to find the decoding in the cache if let decoded @ Some(_) = self.asset_types.get(&asset_type) { + tracing::debug!( + "Asset type: {}, found cached data: {:#?}", + asset_type, + decoded + ); return decoded.cloned(); } // Query for the ID of the last accepted transaction @@ -1701,6 +1706,10 @@ pub trait ShieldedApi: if self.decode_asset_type(client, asset_type).await.is_none() { // If we fail to decode the epoched asset type, then remove the // epoch + tracing::debug!( + "Failed to decode epoched asset type, undating it: {:#?}", + decoded + ); decoded.undate(); asset_type = decoded .encode()