Fix test_replay_commitment_cache (#16131)

This commit is contained in:
sakridge 2021-03-25 14:16:39 -07:00 committed by GitHub
parent d3d6d8fb78
commit 9b94741290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

View File

@ -2974,7 +2974,19 @@ pub(crate) mod tests {
arc_bank.freeze();
}
for _ in 0..10 {
let done = {
let bcc = block_commitment_cache.read().unwrap();
bcc.get_block_commitment(0).is_some()
&& bcc.get_block_commitment(1).is_some()
&& bcc.get_block_commitment(2).is_some()
};
if done {
break;
} else {
thread::sleep(Duration::from_millis(200));
}
}
let mut expected0 = BlockCommitment::default();
expected0.increase_confirmation_stake(3, leader_lamports);