fn build_clients(&self, client_count: usize) -> Vec<Arc<Mutex<Client>>> {
        let mut clients = Vec::new();
        // Need at least 2 clients to send transactions to each other.
        assert_gt!(client_count, 1);

        // Build an address book for each client (for memos)
        let address_book: Vec<_> = self
            .account_keys
            .iter()
            .map(|x| x.default_subaddress())
            .collect();

        for (i, account_key) in self.account_keys.iter().enumerate() {
            log::debug!(
                self.logger,
                "Now building client for account_key {} {:?}",
                i,
                account_key
            );
            let uri = &self.consensus_uris[i % self.consensus_uris.len()];
            let client = ClientBuilder::new(
                uri.clone(),
                self.fog_view.clone(),
                self.fog_ledger.clone(),
                account_key.clone(),
                self.logger.clone(),
            )
            .ring_size(RING_SIZE)
            .use_rth_memos(self.policy.test_rth_memos)
            .address_book(address_book.clone())
            .consensus_sig(self.consensus_sig.clone())
            .fog_ingest_sig(self.fog_ingest_sig.clone())
            .fog_ledger_sig(self.fog_ledger_sig.clone())
            .fog_view_sig(self.fog_view_sig.clone())
            .build();
            clients.push(Arc::new(Mutex::new(client)));
        }
        clients
    }
/// Build the clients
///
/// Arguments:
/// * client count: the number of clients to build. Need at least two for
///   the test to work
Build the clients
Arguments:
client count: the number of clients to build. Need at least two for
the test to work
Build the clients Arguments : client count : the number of clients to build . Need at least two for the test to work
fn build_clients(&self, client_count: usize) -> Vec<Arc<Mutex<Client>>> {
        let mut clients = Vec::new();
        // Need at least 2 clients to send transactions to each other.
        assert_gt!(client_count, 1);
        // Build an address book for each client (for memos)
        let address_book: Vec<_> = self
            .account_keys
            .iter()
            .map(|x| x.default_subaddress())
            .collect();
        for (i, account_key) in self.account_keys.iter().enumerate() {
            log::debug!(
                self.logger,
                "Now building client for account_key {} {:?}",
                i,
                account_key
            );
            let uri = &self.consensus_uris[i % self.consensus_uris.len()];
            let client = ClientBuilder::new(
                uri.clone(),
                self.fog_view.clone(),
                self.fog_ledger.clone(),
                account_key.clone(),
                self.logger.clone(),
            )
            .ring_size(RING_SIZE)
            .use_rth_memos(self.policy.test_rth_memos)
            .address_book(address_book.clone())
            .consensus_sig(self.consensus_sig.clone())
            .fog_ingest_sig(self.fog_ingest_sig.clone())
            .fog_ledger_sig(self.fog_ledger_sig.clone())
            .fog_view_sig(self.fog_view_sig.clone())
            .build();
            clients.push(Arc::new(Mutex::new(client)));
        }
        clients
    }
fn build_clients ( & self , client_count : usize ) -> Vec < Arc < Mutex < Client > > > { let mut clients = Vec :: new ( ) ; // Need at least 2 clients to send transactions to each other. assert_gt ! ( client_count 1 ) ; // Build an address book for each client (for memos) let address_book : Vec < _ > = self . account_keys . iter ( ) . map ( | x | x . default_subaddress ( ) ) . collect ( ) ; for ( i , account_key ) in self . account_keys . iter ( ) . enumerate ( ) { log :: debug ! ( self logger " " i account_key ) ; let uri = & self . consensus_uris [ i % self . consensus_uris . len ( ) ] ; let client = ClientBuilder :: new ( uri . clone ( ) , self . fog_view . clone ( ) , self . fog_ledger . clone ( ) , account_key . clone ( ) , self . logger . clone ( ) , ) . ring_size ( RING_SIZE ) . use_rth_memos ( self . policy . test_rth_memos ) . address_book ( address_book . clone ( ) ) . consensus_sig ( self . consensus_sig . clone ( ) ) . fog_ingest_sig ( self . fog_ingest_sig . clone ( ) ) . fog_ledger_sig ( self . fog_ledger_sig . clone ( ) ) . fog_view_sig ( self . fog_view_sig . clone ( ) ) . build ( ) ; clients . push ( Arc :: new ( Mutex :: new ( client ) ) ) ; } clients }
Build the clients
Arguments:
 client count: the number of clients to build.
Build the clients Arguments : client count : the number of clients to build .
&self
client_count
usize
&self
client_count
usize