Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Prefix to log line so it's easier to search. #3486

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion wen-restart/src/heaviest_fork_aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,15 @@ impl HeaviestForkAggregate {
}

pub(crate) fn print_block_stake_map(&self) {
let total_stake = self.epoch_stakes.total_stake();
for ((slot, hash), stake) in self.block_stake_map.iter() {
info!("Slot: {}, Hash: {}, Stake: {}", slot, hash, stake,);
info!(
"Heaviest Fork Aggregated Slot: {}, Hash: {}, Stake: {}, Percent: {:.2}%",
slot,
hash,
stake,
*stake as f64 / total_stake as f64 * 100.0,
);
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions wen-restart/src/wen_restart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,12 @@ pub(crate) fn aggregate_restart_heaviest_fork(
.unwrap()
.total_active_stake = current_total_active_stake;
}
let total_active_stake = heaviest_fork_aggregate.total_active_stake();
info!(
"Total active stake: {} Total stake {}",
heaviest_fork_aggregate.total_active_stake(),
total_stake
"Total active stake: {} Total stake {} Active percent: {:.2}%",
total_active_stake,
total_stake,
total_active_stake as f64 / total_stake as f64 * 100.0,
);
write_wen_restart_records(wen_restart_path, progress)?;
let elapsed = timestamp().saturating_sub(start);
Expand Down
Loading