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:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							b2c2fa40a2
						
					
				
				
					commit
					69b3c75f0d
				
			@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user