pub fn punish<F>(&self, validator_count: usize, mut punish_with: F)
		where F: FnMut(usize, usize)
	{
		// If all validators have been skipped, then it implies some sort of 
		// systematic problem common to all rather than a minority of validators
		// unfulfilling their specific duties. In this case, it doesn't make
		// sense to punish anyone, so we guard against it.
		if self.skipped < validator_count {
			for index in 0..self.skipped {
				punish_with((self.start_slot + index) % validator_count, 1);
			}
		}
	}
/// Call the closure with (validator_indices, punishment_count) for each
/// validator to punish.
Call the closure with (validator_indices, punishment_count) for each
validator to punish.
Call the closure with ( validator_indices punishment_count ) for each validator to punish .
pub fn punish<F>(&self, validator_count: usize, mut punish_with: F)
		where F: FnMut(usize, usize)
	{
		// If all validators have been skipped, then it implies some sort of 
		// systematic problem common to all rather than a minority of validators
		// unfulfilling their specific duties. In this case, it doesn't make
		// sense to punish anyone, so we guard against it.
		if self.skipped < validator_count {
			for index in 0..self.skipped {
				punish_with((self.start_slot + index) % validator_count, 1);
			}
		}
	}
pub fn punish < F > ( & self , validator_count : usize , mut punish_with : F ) where F : FnMut ( usize , usize ) { // If all validators have been skipped, then it implies some sort of  // systematic problem common to all rather than a minority of validators // unfulfilling their specific duties. In this case, it doesn't make // sense to punish anyone, so we guard against it. if self . skipped < validator_count { for index in 0 .. self . skipped { punish_with ( ( self . start_slot + index ) % validator_count , 1 ) ; } } }
Call the closure with (validator_indices, punishment_count) for each
validator to punish.
Call the closure with ( validator_indices punishment_count ) for each validator to punish .
&self
validator_count
usize
punish_with
F
&self
validator_count
usize
punish_with
F