Skip to content

Commit

Permalink
fix: update logging in cbt l1 behaviour (#3149)
Browse files Browse the repository at this point in the history
Stop converting `BigDecimal` to `BigInt` when logging to avoid loosing
precision.
  • Loading branch information
ischasny authored Oct 23, 2024
1 parent e7b587a commit d0f61b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/node/base_token_adjuster/src/base_token_l1_behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{
};

use anyhow::Context;
use bigdecimal::{num_bigint::ToBigInt, BigDecimal, Zero};
use bigdecimal::{BigDecimal, Zero};
use zksync_config::BaseTokenAdjusterConfig;
use zksync_eth_client::{BoundEthInterface, CallFunctionArgs, Options};
use zksync_node_fee_model::l1_gas_price::TxParamsProvider;
Expand Down Expand Up @@ -57,7 +57,7 @@ impl BaseTokenL1Behaviour {
self.update_last_persisted_l1_ratio(prev_ratio.clone());
tracing::info!(
"Fetched current base token ratio from the L1: {}",
prev_ratio.to_bigint().unwrap()
prev_ratio
);
prev_ratio
};
Expand All @@ -71,7 +71,7 @@ impl BaseTokenL1Behaviour {
"Skipping L1 update. current_ratio {}, previous_ratio {}, deviation {}",
current_ratio,
prev_ratio,
deviation.to_bigint().unwrap()
deviation
);
return Ok(());
}
Expand All @@ -98,7 +98,7 @@ impl BaseTokenL1Behaviour {
new_ratio.denominator.get(),
base_fee_per_gas,
priority_fee_per_gas,
deviation.to_bigint().unwrap()
deviation
);
METRICS
.l1_gas_used
Expand Down

0 comments on commit d0f61b0

Please sign in to comment.