Remove loop (#8493)

This commit is contained in:
carllin 2020-02-26 19:59:29 -08:00 committed by GitHub
parent 8c07ba635e
commit 5f766cd20b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 117 additions and 125 deletions

View File

@ -242,7 +242,6 @@ impl ReplayStage {
Self::report_memory(&allocated, "replay_active_banks", start);
let ancestors = Arc::new(bank_forks.read().unwrap().ancestors());
loop {
let start = allocated.get();
let mut frozen_banks: Vec<_> = bank_forks
.read()
@ -292,7 +291,6 @@ impl ReplayStage {
fork_stats.total_staked,
)
};
let mut done = false;
let mut vote_bank_slot = None;
let start = allocated.get();
if !is_locked_out && vote_threshold {
@ -364,14 +362,8 @@ impl ReplayStage {
partition = false;
inc_new_counter_info!("replay_stage-partition_resolved", 1);
}
} else {
done = true;
}
Self::report_memory(&allocated, "reset_bank", start);
if done {
break;
}
}
let start = allocated.get();
if !tpu_has_bank {