pub fn more_work_peers(&self) -> Vec<Arc<Peer>> {
		let peers = self.connected_peers();
		if peers.len() == 0 {
			return vec![];
		}

		let total_difficulty = self.total_difficulty();

		let mut max_peers = peers
			.into_iter()
			.filter(|x| x.info.total_difficulty() > total_difficulty)
			.collect::<Vec<_>>();

		thread_rng().shuffle(&mut max_peers);
		max_peers
	}
// Return vec of connected peers that currently advertise more work
// (total_difficulty) than we do.
Return vec of connected peers that currently advertise more work
(total_difficulty) than we do.
Return vec of connected peers that currently advertise more work ( total_difficulty ) than we do .
pub fn more_work_peers(&self) -> Vec<Arc<Peer>> {
		let peers = self.connected_peers();
		if peers.len() == 0 {
			return vec![];
		}
		let total_difficulty = self.total_difficulty();
		let mut max_peers = peers
			.into_iter()
			.filter(|x| x.info.total_difficulty() > total_difficulty)
			.collect::<Vec<_>>();
		thread_rng().shuffle(&mut max_peers);
		max_peers
	}
pub fn more_work_peers ( & self ) -> Vec < Arc < Peer > > { let peers = self . connected_peers ( ) ; if peers . len ( ) == 0 { return vec ! [ ] ; } let total_difficulty = self . total_difficulty ( ) ; let mut max_peers = peers . into_iter ( ) . filter ( | x | x . info . total_difficulty ( ) > total_difficulty ) . collect :: < Vec < _ > > ( ) ; thread_rng ( ) . shuffle ( & mut max_peers ) ; max_peers }
Return vec of connected peers that currently advertise more work
(total_difficulty) than we do.
Return vec of connected peers that currently advertise more work ( total_difficulty ) than we do .
&self