Skip to content

Commit

Permalink
Merge pull request #4113 from anoma/mergify/bp/maint-0.46/pr-4101
Browse files Browse the repository at this point in the history
Adds debug trace for masp epochs in asset types (backport #4101)
  • Loading branch information
mergify[bot] authored Nov 29, 2024
2 parents 6bd88fc + 2c20ab2 commit 998c1f5
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 998c1f5

Please sign in to comment.