Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(sequencer): logging as human readable for account state #898

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/astria-sequencer/src/accounts/state_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn nonce_storage_key(address: Address) -> String {

#[async_trait]
pub(crate) trait StateReadExt: StateRead {
#[instrument(skip(self))]
#[instrument(skip_all, fields(address=%address))]
async fn get_account_balances(&self, address: Address) -> Result<Vec<AssetBalance>> {
use crate::asset::state_ext::StateReadExt as _;

Expand Down Expand Up @@ -101,7 +101,7 @@ pub(crate) trait StateReadExt: StateRead {
Ok(balances)
}

#[instrument(skip(self))]
#[instrument(skip_all, fields(address=%address, asset_id=%asset))]
async fn get_account_balance(&self, address: Address, asset: asset::Id) -> Result<u128> {
let Some(bytes) = self
.get_raw(&balance_storage_key(address, asset))
Expand All @@ -115,7 +115,7 @@ pub(crate) trait StateReadExt: StateRead {
Ok(balance)
}

#[instrument(skip(self))]
#[instrument(skip_all, fields(address=%address))]
async fn get_account_nonce(&self, address: Address) -> Result<u32> {
let bytes = self
.get_raw(&nonce_storage_key(address))
Expand Down
Loading