Skip to content

Commit 289d6bc

Browse files
committed
remove unnecessary traces
1 parent 8fc1ebf commit 289d6bc

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/agent/state/oracle.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ pub struct OracleState {
178178

179179
impl OracleState {
180180
pub fn new() -> Self {
181-
tracing::info!("Initializing OracleState");
182181
Self {
183182
data: Default::default(),
184183
}
@@ -226,14 +225,11 @@ where
226225
account_key: &Pubkey,
227226
account: &Account,
228227
) -> Result<()> {
229-
tracing::debug!("Handling account update.");
230-
231228
let mut data = self.into().data.write().await;
232229

233230
// We are only interested in price account updates, all other types of updates
234231
// will be fetched using polling.
235232
if !data.price_accounts.contains_key(account_key) {
236-
tracing::info!("Account key not found in price accounts, skipping update.");
237233
return Ok(());
238234
}
239235

@@ -249,7 +245,6 @@ where
249245
);
250246

251247
data.price_accounts.insert(*account_key, price_entry);
252-
tracing::info!("Updated price account for key: {}", account_key);
253248

254249
Prices::update_global_price(
255250
self,
@@ -274,17 +269,14 @@ where
274269
rpc_client: &RpcClient,
275270
max_lookup_batch_size: usize,
276271
) -> Result<()> {
277-
tracing::info!("Polling updates for network: {:?}", network);
278272
let mut publisher_permissions = HashMap::new();
279273
let mapping_accounts = fetch_mapping_accounts(rpc_client, mapping_key).await?;
280-
tracing::info!("Fetched mapping accounts.");
281274
let (product_accounts, price_accounts) = fetch_product_and_price_accounts(
282275
rpc_client,
283276
max_lookup_batch_size,
284277
mapping_accounts.values(),
285278
)
286279
.await?;
287-
tracing::info!("Fetched product and price accounts.");
288280

289281
for (price_key, price_entry) in price_accounts.iter() {
290282
for component in price_entry.comp {
@@ -326,7 +318,6 @@ where
326318
let mut data = self.into().data.write().await;
327319
log_data_diff(&data, &new_data);
328320
*data = new_data;
329-
tracing::info!("Updated OracleState data.");
330321

331322
Exporter::update_permissions(
332323
self,
@@ -342,7 +333,6 @@ where
342333
/// Sync Product/Price Accounts found by polling to the Global Store.
343334
#[instrument(skip(self))]
344335
async fn sync_global_store(&self, network: Network) -> Result<()> {
345-
tracing::info!("Syncing global store for network: {:?}", network);
346336
for (product_account_key, product_account) in
347337
&self.into().data.read().await.product_accounts
348338
{
@@ -370,8 +360,6 @@ where
370360
.await
371361
.map_err(|_| anyhow!("failed to notify price account update"))?;
372362
}
373-
374-
tracing::info!("Global store sync completed.");
375363
Ok(())
376364
}
377365
}
@@ -381,10 +369,6 @@ async fn fetch_mapping_accounts(
381369
rpc_client: &RpcClient,
382370
mapping_account_key: Pubkey,
383371
) -> Result<HashMap<Pubkey, MappingAccount>> {
384-
tracing::info!(
385-
"Fetching mapping accounts starting from key: {}",
386-
mapping_account_key
387-
);
388372
let mut accounts = HashMap::new();
389373
let mut account_key = mapping_account_key;
390374
while account_key != Pubkey::default() {
@@ -397,7 +381,6 @@ async fn fetch_mapping_accounts(
397381
accounts.insert(account_key, account);
398382
account_key = account.next;
399383
}
400-
tracing::info!("Fetched {} mapping accounts.", accounts.len());
401384
Ok(accounts)
402385
}
403386

@@ -410,7 +393,6 @@ async fn fetch_product_and_price_accounts<'a, A>(
410393
where
411394
A: IntoIterator<Item = &'a MappingAccount>,
412395
{
413-
tracing::info!("Fetching product and price accounts.");
414396
let mut product_keys = vec![];
415397

416398
// Get all product keys
@@ -436,19 +418,13 @@ where
436418
price_entries.extend(batch_prices.drain());
437419
}
438420

439-
tracing::info!(
440-
"Fetched {} product entries and {} price entries.",
441-
product_entries.len(),
442-
price_entries.len()
443-
);
444421
Ok((product_entries, price_entries))
445422
}
446423

447424
async fn fetch_batch_of_product_and_price_accounts(
448425
rpc_client: &RpcClient,
449426
product_key_batch: &[Pubkey],
450427
) -> Result<(HashMap<Pubkey, ProductEntry>, HashMap<Pubkey, PriceEntry>)> {
451-
tracing::info!("Fetching batch of product and price accounts.");
452428
let mut product_entries = HashMap::new();
453429

454430
let product_keys = product_key_batch;
@@ -589,7 +565,6 @@ async fn fetch_batch_of_product_and_price_accounts(
589565

590566
todo = next_todo;
591567
}
592-
tracing::info!("Fetched batch of product and price accounts.");
593568
Ok((product_entries, price_entries))
594569
}
595570

0 commit comments

Comments
 (0)