@@ -178,7 +178,6 @@ pub struct OracleState {
178
178
179
179
impl OracleState {
180
180
pub fn new ( ) -> Self {
181
- tracing:: info!( "Initializing OracleState" ) ;
182
181
Self {
183
182
data : Default :: default ( ) ,
184
183
}
@@ -226,14 +225,11 @@ where
226
225
account_key : & Pubkey ,
227
226
account : & Account ,
228
227
) -> Result < ( ) > {
229
- tracing:: debug!( "Handling account update." ) ;
230
-
231
228
let mut data = self . into ( ) . data . write ( ) . await ;
232
229
233
230
// We are only interested in price account updates, all other types of updates
234
231
// will be fetched using polling.
235
232
if !data. price_accounts . contains_key ( account_key) {
236
- tracing:: info!( "Account key not found in price accounts, skipping update." ) ;
237
233
return Ok ( ( ) ) ;
238
234
}
239
235
@@ -249,7 +245,6 @@ where
249
245
) ;
250
246
251
247
data. price_accounts . insert ( * account_key, price_entry) ;
252
- tracing:: info!( "Updated price account for key: {}" , account_key) ;
253
248
254
249
Prices :: update_global_price (
255
250
self ,
@@ -274,17 +269,14 @@ where
274
269
rpc_client : & RpcClient ,
275
270
max_lookup_batch_size : usize ,
276
271
) -> Result < ( ) > {
277
- tracing:: info!( "Polling updates for network: {:?}" , network) ;
278
272
let mut publisher_permissions = HashMap :: new ( ) ;
279
273
let mapping_accounts = fetch_mapping_accounts ( rpc_client, mapping_key) . await ?;
280
- tracing:: info!( "Fetched mapping accounts." ) ;
281
274
let ( product_accounts, price_accounts) = fetch_product_and_price_accounts (
282
275
rpc_client,
283
276
max_lookup_batch_size,
284
277
mapping_accounts. values ( ) ,
285
278
)
286
279
. await ?;
287
- tracing:: info!( "Fetched product and price accounts." ) ;
288
280
289
281
for ( price_key, price_entry) in price_accounts. iter ( ) {
290
282
for component in price_entry. comp {
@@ -326,7 +318,6 @@ where
326
318
let mut data = self . into ( ) . data . write ( ) . await ;
327
319
log_data_diff ( & data, & new_data) ;
328
320
* data = new_data;
329
- tracing:: info!( "Updated OracleState data." ) ;
330
321
331
322
Exporter :: update_permissions (
332
323
self ,
@@ -342,7 +333,6 @@ where
342
333
/// Sync Product/Price Accounts found by polling to the Global Store.
343
334
#[ instrument( skip( self ) ) ]
344
335
async fn sync_global_store ( & self , network : Network ) -> Result < ( ) > {
345
- tracing:: info!( "Syncing global store for network: {:?}" , network) ;
346
336
for ( product_account_key, product_account) in
347
337
& self . into ( ) . data . read ( ) . await . product_accounts
348
338
{
@@ -370,8 +360,6 @@ where
370
360
. await
371
361
. map_err ( |_| anyhow ! ( "failed to notify price account update" ) ) ?;
372
362
}
373
-
374
- tracing:: info!( "Global store sync completed." ) ;
375
363
Ok ( ( ) )
376
364
}
377
365
}
@@ -381,10 +369,6 @@ async fn fetch_mapping_accounts(
381
369
rpc_client : & RpcClient ,
382
370
mapping_account_key : Pubkey ,
383
371
) -> Result < HashMap < Pubkey , MappingAccount > > {
384
- tracing:: info!(
385
- "Fetching mapping accounts starting from key: {}" ,
386
- mapping_account_key
387
- ) ;
388
372
let mut accounts = HashMap :: new ( ) ;
389
373
let mut account_key = mapping_account_key;
390
374
while account_key != Pubkey :: default ( ) {
@@ -397,7 +381,6 @@ async fn fetch_mapping_accounts(
397
381
accounts. insert ( account_key, account) ;
398
382
account_key = account. next ;
399
383
}
400
- tracing:: info!( "Fetched {} mapping accounts." , accounts. len( ) ) ;
401
384
Ok ( accounts)
402
385
}
403
386
@@ -410,7 +393,6 @@ async fn fetch_product_and_price_accounts<'a, A>(
410
393
where
411
394
A : IntoIterator < Item = & ' a MappingAccount > ,
412
395
{
413
- tracing:: info!( "Fetching product and price accounts." ) ;
414
396
let mut product_keys = vec ! [ ] ;
415
397
416
398
// Get all product keys
@@ -436,19 +418,13 @@ where
436
418
price_entries. extend ( batch_prices. drain ( ) ) ;
437
419
}
438
420
439
- tracing:: info!(
440
- "Fetched {} product entries and {} price entries." ,
441
- product_entries. len( ) ,
442
- price_entries. len( )
443
- ) ;
444
421
Ok ( ( product_entries, price_entries) )
445
422
}
446
423
447
424
async fn fetch_batch_of_product_and_price_accounts (
448
425
rpc_client : & RpcClient ,
449
426
product_key_batch : & [ Pubkey ] ,
450
427
) -> Result < ( HashMap < Pubkey , ProductEntry > , HashMap < Pubkey , PriceEntry > ) > {
451
- tracing:: info!( "Fetching batch of product and price accounts." ) ;
452
428
let mut product_entries = HashMap :: new ( ) ;
453
429
454
430
let product_keys = product_key_batch;
@@ -589,7 +565,6 @@ async fn fetch_batch_of_product_and_price_accounts(
589
565
590
566
todo = next_todo;
591
567
}
592
- tracing:: info!( "Fetched batch of product and price accounts." ) ;
593
568
Ok ( ( product_entries, price_entries) )
594
569
}
595
570
0 commit comments