Reduce slot duration and consecutive leader slots (#4838)

* change consecutive leader slots to 4

* reduce polling frequency for transaction signature confirmation

* adjust wait time for transaction signature confirmation

* fix nominal test

* fix flakiness in wallet pay test
This commit is contained in:
Pankaj Garg
2019-07-01 13:21:00 -07:00
committed by GitHub
parent c1953dca8f
commit 38b44f2496
4 changed files with 47 additions and 17 deletions

View File

@@ -12,10 +12,20 @@ use std::sync::mpsc::channel;
#[cfg(test)]
use solana::validator::new_validator_for_tests;
use std::thread::sleep;
use std::time::Duration;
fn check_balance(expected_balance: u64, client: &RpcClient, pubkey: &Pubkey) {
let balance = client.retry_get_balance(pubkey, 1).unwrap().unwrap();
assert_eq!(balance, expected_balance);
(0..5).for_each(|tries| {
let balance = client.retry_get_balance(pubkey, 1).unwrap().unwrap();
if balance == expected_balance {
return;
}
if tries == 4 {
assert_eq!(balance, expected_balance);
}
sleep(Duration::from_millis(500));
});
}
#[test]