Skip to content

Commit

Permalink
Adds debug trace for masp epochs in asset types
Browse files Browse the repository at this point in the history
(cherry picked from commit 2446847)
  • Loading branch information
grarco authored and mergify[bot] committed Nov 29, 2024
1 parent 6bd88fc commit 2c20ab2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/shielded_token/src/masp/shielded_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,11 @@ pub trait ShieldedApi<U: ShieldedUtils + MaybeSend + MaybeSync>:
) -> Option<AssetData> {
// 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
Expand Down Expand Up @@ -1701,6 +1706,10 @@ pub trait ShieldedApi<U: ShieldedUtils + MaybeSend + MaybeSync>:
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()
Expand Down

0 comments on commit 2c20ab2

Please sign in to comment.