Sleep between vote refreshes (#27115)

* Sleep between vote refreshes in unit test
This commit is contained in:
Brennan Watt 2022-08-12 13:45:00 -07:00 committed by GitHub
parent cb16281736
commit 521c550ccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -3760,6 +3760,8 @@ RPC Enabled Nodes: 1"#;
latest_refreshed_recent_blockhash,
);
cluster_info.refresh_vote(latest_refresh_tx.clone(), refresh_slot);
// Sleep to avoid votes with same timestamp causing later vote to not override prior vote
std::thread::sleep(Duration::from_millis(1));
}
// The diff since `max_ts` should only be the latest refreshed vote
let votes = cluster_info.get_votes(&mut cursor);