async fn save_accounts(&self) {
        // Timestamp is used to generate unique file name postfix.
        let timestamp = Utc::now();
        let timestamp_str = timestamp.format("%Y_%m_%d_%H_%M_%S").to_string();

        let output_file_name = format!("loadtest_accounts_{}.txt", timestamp_str);

        let mut account_list = String::new();

        // Add all the accounts to the string.
        // Debug representations of account contains both zkSync and Ethereum private keys.
        account_list += &format!("{:?}\n", self.main_account.zk_acc);
        for account in self.accounts.iter() {
            account_list += &format!("{:?}\n", account);
        }

        // If we're unable to save the file, print its contents to the console at least.
        if let Err(error) = fs::write(&output_file_name, &account_list).await {
            log::error!(
                "Storing the account list erred with the following error: {}",
                error
            );
            log::warn!(
                "Printing the account list to the log instead: \n{}",
                account_list
            )
        } else {
            log::info!(
                "Accounts used in this test are saved to the file '{}'",
                &output_file_name
            );
        }
    }
/// Method to be used before the scenario.
/// It stores all the zkSync account keys into a file named
/// like "loadtest_accounts_2020_05_05_12_23_55.txt"
/// so the funds left on accounts will not be lost.
///
/// If saving the file fails, the accounts are printed to the log.
Method to be used before the scenario.
It stores all the zkSync account keys into a file named
like "loadtest_accounts_2020_05_05_12_23_55.txt"
so the funds left on accounts will not be lost.

If saving the file fails, the accounts are printed to the log.
Method to be used before the scenario . It stores all the zkSync account keys into a file named like " loadtest_accounts_2020_05_05_12_23_55 . txt " so the funds left on accounts will not be lost . If saving the file fails the accounts are printed to the log .
async fn save_accounts(&self) {
        // Timestamp is used to generate unique file name postfix.
        let timestamp = Utc::now();
        let timestamp_str = timestamp.format("%Y_%m_%d_%H_%M_%S").to_string();
        let output_file_name = format!("loadtest_accounts_{}.txt", timestamp_str);
        let mut account_list = String::new();
        // Add all the accounts to the string.
        // Debug representations of account contains both zkSync and Ethereum private keys.
        account_list += &format!("{:?}\n", self.main_account.zk_acc);
        for account in self.accounts.iter() {
            account_list += &format!("{:?}\n", account);
        }
        // If we're unable to save the file, print its contents to the console at least.
        if let Err(error) = fs::write(&output_file_name, &account_list).await {
            log::error!(
                "Storing the account list erred with the following error: {}",
                error
            );
            log::warn!(
                "Printing the account list to the log instead: \n{}",
                account_list
            )
        } else {
            log::info!(
                "Accounts used in this test are saved to the file '{}'",
                &output_file_name
            );
        }
    }
async fn save_accounts ( & self ) { // Timestamp is used to generate unique file name postfix. let timestamp = Utc :: now ( ) ; let timestamp_str = timestamp . format ( " " ) . to_string ( ) ; let output_file_name = format ! ( " " timestamp_str ) ; let mut account_list = String :: new ( ) ; // Add all the accounts to the string. // Debug representations of account contains both zkSync and Ethereum private keys. account_list += & format ! ( " \n " self main_account zk_acc ) ; for account in self . accounts . iter ( ) { account_list += & format ! ( " \n " account ) ; } // If we're unable to save the file, print its contents to the console at least. if let Err ( error ) = fs :: write ( & output_file_name , & account_list ) . await { log :: error ! ( " " error ) ; log :: warn ! ( " \n " account_list ) } else { log :: info ! ( " " output_file_name ) ; } }
Method to be used before the scenario.
Method to be used before the scenario .
&self