Remove holding Poh lock (#8838) (#8850)

automerge
This commit is contained in:
mergify[bot]
2020-03-13 16:56:22 -07:00
committed by GitHub
parent a3a14d6b5b
commit 12bf34f059
2 changed files with 4 additions and 2 deletions

View File

@ -51,7 +51,8 @@ impl ClusterInfoVoteListener {
if exit.load(Ordering::Relaxed) {
return Ok(());
}
if let Some(bank) = poh_recorder.lock().unwrap().bank() {
let poh_bank = poh_recorder.lock().unwrap().bank();
if let Some(bank) = poh_bank {
let last_ts = bank.last_vote_sync.load(Ordering::Relaxed);
let (votes, new_ts) = cluster_info.read().unwrap().get_votes(last_ts);
bank.last_vote_sync

View File

@ -395,7 +395,8 @@ impl ReplayStage {
rewards_recorder_sender.clone(),
);
if let Some(bank) = poh_recorder.lock().unwrap().bank() {
let poh_bank = poh_recorder.lock().unwrap().bank();
if let Some(bank) = poh_bank {
Self::log_leader_change(
&my_pubkey,
bank.slot(),