pub fn gen_and_mint_accounts(
        &mut self,
        mint_key_file_path: &str,
        num_accounts: u64,
    ) -> Result<Vec<AccountData>> {
        let mut results = vec![];
        let mut mint_requests = vec![];
        let mut faucet_account = self.load_faucet_account(mint_key_file_path);
        for _i in 0..num_accounts {
            let account = self.gen_next_account();
            let mint_txn_req = self.gen_mint_txn_request(&mut faucet_account, &account.address)?;
            results.push(account);
            mint_requests.push(mint_txn_req);
        }
        // We stop immediately if any minting fails.
        let (num_accepted, num_committed, _, _) =
            self.submit_and_wait_txn_committed(&mint_requests);
        if num_accepted != mint_requests.len() || num_accepted - num_committed > 0 {
            bail!(
                "{} of {} mint transaction(s) accepted, and {} failed",
                num_accepted,
                mint_requests.len(),
                num_accepted - num_committed,
            )
        } else {
            Ok(results)
        }
    }
/// Generate a number of random accounts and minting these accounts using self's AC client(s).
/// Mint TXNs must be 100% successful in order to continue benchmark.
/// Caller is responsible for terminating the benchmark with expect().
Generate a number of random accounts and minting these accounts using self's AC client(s).
Mint TXNs must be 100% successful in order to continue benchmark.
Caller is responsible for terminating the benchmark with expect().
Generate a number of random accounts and minting these accounts using self ' s AC client ( s ) . Mint TXNs must be 100% successful in order to continue benchmark . Caller is responsible for terminating the benchmark with expect () .
pub fn gen_and_mint_accounts(
        &mut self,
        mint_key_file_path: &str,
        num_accounts: u64,
    ) -> Result<Vec<AccountData>> {
        let mut results = vec![];
        let mut mint_requests = vec![];
        let mut faucet_account = self.load_faucet_account(mint_key_file_path);
        for _i in 0..num_accounts {
            let account = self.gen_next_account();
            let mint_txn_req = self.gen_mint_txn_request(&mut faucet_account, &account.address)?;
            results.push(account);
            mint_requests.push(mint_txn_req);
        }
        // We stop immediately if any minting fails.
        let (num_accepted, num_committed, _, _) =
            self.submit_and_wait_txn_committed(&mint_requests);
        if num_accepted != mint_requests.len() || num_accepted - num_committed > 0 {
            bail!(
                "{} of {} mint transaction(s) accepted, and {} failed",
                num_accepted,
                mint_requests.len(),
                num_accepted - num_committed,
            )
        } else {
            Ok(results)
        }
    }
pub fn gen_and_mint_accounts ( & mut self , mint_key_file_path : & str , num_accounts : u64 , ) -> Result < Vec < AccountData > > { let mut results = vec ! [ ] ; let mut mint_requests = vec ! [ ] ; let mut faucet_account = self . load_faucet_account ( mint_key_file_path ) ; for _i in 0 .. num_accounts { let account = self . gen_next_account ( ) ; let mint_txn_req = self . gen_mint_txn_request ( & mut faucet_account , & account . address ) ? ; results . push ( account ) ; mint_requests . push ( mint_txn_req ) ; } // We stop immediately if any minting fails. let ( num_accepted , num_committed , _ , _ ) = self . submit_and_wait_txn_committed ( & mint_requests ) ; if num_accepted != mint_requests . len ( ) || num_accepted - num_committed > 0 { bail ! ( " " num_accepted mint_requests len ( ) num_accepted num_committed ) } else { Ok ( results ) } }
Generate a number of random accounts and minting these accounts using self's AC client(s).
Generate a number of random accounts and minting these accounts using self ' s AC client ( s ) .
&mut self
mint_key_file_path
&str
num_accounts
u64