@@ -293,8 +293,8 @@ impl<T: BeaconChainTypes> ChainCollection<T> {
293293 . expect ( "Chain exists" ) ;
294294
295295 match old_id {
296- Some ( Some ( old_id) ) => debug ! ( old_id, % chain, "Switching finalized chains" ) ,
297- None => debug ! ( % chain, "Syncing new finalized chain" ) ,
296+ Some ( Some ( old_id) ) => debug ! ( old_id, id = chain. id ( ) , "Switching finalized chains" ) ,
297+ None => debug ! ( id = chain. id ( ) , "Syncing new finalized chain" ) ,
298298 Some ( None ) => {
299299 // this is the same chain. We try to advance it.
300300 }
@@ -359,7 +359,7 @@ impl<T: BeaconChainTypes> ChainCollection<T> {
359359 if syncing_chains. len ( ) < PARALLEL_HEAD_CHAINS {
360360 // start this chain if it's not already syncing
361361 if !chain. is_syncing ( ) {
362- debug ! ( % chain, "New head chain started syncing" ) ;
362+ debug ! ( id = chain. id ( ) , "New head chain started syncing" ) ;
363363 }
364364 if let Err ( remove_reason) =
365365 chain. start_syncing ( network, local_epoch, local_head_epoch)
@@ -421,7 +421,7 @@ impl<T: BeaconChainTypes> ChainCollection<T> {
421421 if is_outdated ( & chain. target_head_slot , & chain. target_head_root )
422422 || chain. available_peers ( ) == 0
423423 {
424- debug ! ( %chain , "Purging out of finalized chain" ) ;
424+ debug ! ( id , "Purging out of finalized chain" ) ;
425425 Some ( ( * id, chain. is_syncing ( ) , RangeSyncType :: Finalized ) )
426426 } else {
427427 None
@@ -432,7 +432,7 @@ impl<T: BeaconChainTypes> ChainCollection<T> {
432432 if is_outdated ( & chain. target_head_slot , & chain. target_head_root )
433433 || chain. available_peers ( ) == 0
434434 {
435- debug ! ( %chain , "Purging out of date head chain" ) ;
435+ debug ! ( id , "Purging out of date head chain" ) ;
436436 Some ( ( * id, chain. is_syncing ( ) , RangeSyncType :: Head ) )
437437 } else {
438438 None
@@ -478,9 +478,9 @@ impl<T: BeaconChainTypes> ChainCollection<T> {
478478 debug_assert_eq ! ( chain. target_head_slot, target_head_slot) ;
479479 if let Err ( remove_reason) = chain. add_peer ( network, peer) {
480480 if remove_reason. is_critical ( ) {
481- crit ! ( chain = % id, reason = ?remove_reason, "Chain removed after adding peer" ) ;
481+ crit ! ( id, reason = ?remove_reason, "Chain removed after adding peer" ) ;
482482 } else {
483- error ! ( chain = % id, reason = ?remove_reason, "Chain removed after adding peer" ) ;
483+ error ! ( id, reason = ?remove_reason, "Chain removed after adding peer" ) ;
484484 }
485485 let is_syncing = chain. is_syncing ( ) ;
486486 collection. remove ( & id) ;
@@ -499,7 +499,15 @@ impl<T: BeaconChainTypes> ChainCollection<T> {
499499 sync_type. into ( ) ,
500500 ) ;
501501
502- debug ! ( peer_id = peer_rpr, ?sync_type, %new_chain, "New chain added to sync" ) ;
502+ debug ! (
503+ peer_id = peer_rpr,
504+ ?sync_type,
505+ id,
506+ %start_epoch,
507+ %target_head_slot,
508+ ?target_head_root,
509+ "New chain added to sync"
510+ ) ;
503511 collection. insert ( id, new_chain) ;
504512 metrics:: inc_counter_vec ( & metrics:: SYNCING_CHAINS_ADDED , & [ sync_type. as_str ( ) ] ) ;
505513 self . update_metrics ( ) ;
0 commit comments