Clean up logging and make variables consistent (#25049)

This commit is contained in:
Justin Starry 2022-05-07 03:52:45 +08:00 committed by GitHub
parent 082502d4f3
commit c920d411f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View File

@ -753,10 +753,7 @@ pub(crate) fn check_slot_agrees_with_cluster(
slot_state_update: SlotStateUpdate, slot_state_update: SlotStateUpdate,
) { ) {
info!( info!(
"check_slot_agrees_with_cluster() "check_slot_agrees_with_cluster() slot: {}, root: {}, slot_state_update: {:?}",
slot: {},
root: {},
slot_state_update: {:?}",
slot, root, slot_state_update slot, root, slot_state_update
); );

View File

@ -209,7 +209,7 @@ fn run_check_duplicate(
cluster_info: &ClusterInfo, cluster_info: &ClusterInfo,
blockstore: &Blockstore, blockstore: &Blockstore,
shred_receiver: &Receiver<Shred>, shred_receiver: &Receiver<Shred>,
duplicate_slot_sender: &DuplicateSlotSender, duplicate_slots_sender: &DuplicateSlotSender,
) -> Result<()> { ) -> Result<()> {
let check_duplicate = |shred: Shred| -> Result<()> { let check_duplicate = |shred: Shred| -> Result<()> {
let shred_slot = shred.slot(); let shred_slot = shred.slot();
@ -224,7 +224,7 @@ fn run_check_duplicate(
shred.into_payload(), shred.into_payload(),
)?; )?;
duplicate_slot_sender.send(shred_slot)?; duplicate_slots_sender.send(shred_slot)?;
} }
} }
@ -530,7 +530,7 @@ impl WindowService {
exit: Arc<AtomicBool>, exit: Arc<AtomicBool>,
blockstore: Arc<Blockstore>, blockstore: Arc<Blockstore>,
duplicate_receiver: Receiver<Shred>, duplicate_receiver: Receiver<Shred>,
duplicate_slot_sender: DuplicateSlotSender, duplicate_slots_sender: DuplicateSlotSender,
) -> JoinHandle<()> { ) -> JoinHandle<()> {
let handle_error = || { let handle_error = || {
inc_new_counter_error!("solana-check-duplicate-error", 1, 1); inc_new_counter_error!("solana-check-duplicate-error", 1, 1);
@ -547,7 +547,7 @@ impl WindowService {
&cluster_info, &cluster_info,
&blockstore, &blockstore,
&duplicate_receiver, &duplicate_receiver,
&duplicate_slot_sender, &duplicate_slots_sender,
) { ) {
if Self::should_exit_on_error(e, &mut noop, &handle_error) { if Self::should_exit_on_error(e, &mut noop, &handle_error) {
break; break;