Power of two chance (#314)

* fix validator script
* 1/2^30 that we fail due to random returning the same value
This commit is contained in:
anatoly yakovenko 2018-06-04 13:32:34 -07:00 committed by GitHub
parent b2c2fa40a2
commit 69b3c75f0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -18,4 +18,4 @@ export RUST_LOG=solana=info
sudo sysctl -w net.core.rmem_max=26214400
cargo run --release --features=cuda --bin solana-fullnode -- \
-l validator.json -v leader.json -b 9000 -d < genesis.log
-l validator.json -v leader.json < genesis.log

View File

@ -922,7 +922,8 @@ mod tests {
let thread = Crdt::gossip(obj, recycler, sender, exit.clone());
let mut one = false;
let mut two = false;
for _ in 0..5 {
for _ in 0..30 {
//50% chance each try that we get a repeat
let mut rv = reader.recv_timeout(Duration::new(1, 0)).unwrap();
while let Ok(mut more) = reader.try_recv() {
rv.append(&mut more);