Do not log detailed epoch stakes (#30825)
* do not log detailed epoch stakes * allow dead code * log stake details at trace level * no need dead_code * Update runtime/src/bank.rs Co-authored-by: Brooks <brooks@prumo.org> --------- Co-authored-by: Brooks <brooks@prumo.org>
This commit is contained in:
parent
2216647f7e
commit
d646820a6e
|
@ -2278,7 +2278,15 @@ impl Bank {
|
|||
let stakes = self.stakes_cache.stakes().clone();
|
||||
let stakes = Arc::new(StakesEnum::from(stakes));
|
||||
let new_epoch_stakes = EpochStakes::new(stakes, leader_schedule_epoch);
|
||||
{
|
||||
info!(
|
||||
"new epoch stakes, epoch: {}, total_stake: {}",
|
||||
leader_schedule_epoch,
|
||||
new_epoch_stakes.total_stake(),
|
||||
);
|
||||
|
||||
// It is expensive to log the details of epoch stakes. Only log them at "trace"
|
||||
// level for debugging purpose.
|
||||
if log::log_enabled!(log::Level::Trace) {
|
||||
let vote_stakes: HashMap<_, _> = self
|
||||
.stakes_cache
|
||||
.stakes()
|
||||
|
@ -2286,12 +2294,7 @@ impl Bank {
|
|||
.delegated_stakes()
|
||||
.map(|(pubkey, stake)| (*pubkey, stake))
|
||||
.collect();
|
||||
info!(
|
||||
"new epoch stakes, epoch: {}, stakes: {:#?}, total_stake: {}",
|
||||
leader_schedule_epoch,
|
||||
vote_stakes,
|
||||
new_epoch_stakes.total_stake(),
|
||||
);
|
||||
trace!("new epoch stakes, stakes: {vote_stakes:#?}");
|
||||
}
|
||||
self.epoch_stakes
|
||||
.insert(leader_schedule_epoch, new_epoch_stakes);
|
||||
|
|
Loading…
Reference in New Issue