fn load_faucet_account(&self, faucet_account_path: &str) -> AccountData {
        let faucet_account_keypair: KeyPair =
            load_key_from_file(faucet_account_path).expect("invalid faucet keypair file");
        let address = association_address();
        // Request and wait for account's (sequence_number, account_status) from a validator.
        // Assume Benchmarker is the ONLY active client in the libra network.
        let client = self
            .clients
            .get(0)
            .expect("no available AdmissionControlClient");
        let states = get_account_states(client, &[address]);
        let (sequence_number, status) = states
            .expect("failed to get faucet account from validator")
            .pop()
            .expect("faucet account not found");
        AccountData {
            address,
            key_pair: Some(faucet_account_keypair),
            sequence_number,
            status,
        }
    }
/// Load keypair from given faucet_account_path,
/// then try to sync with a validator to get up-to-date faucet account's sequence number.
/// Why restore faucet account: Benchmarker as a client can be stopped/restarted repeatedly
/// while the libra swarm as a server keeping running.
Load keypair from given faucet_account_path,
then try to sync with a validator to get up-to-date faucet account's sequence number.
Why restore faucet account: Benchmarker as a client can be stopped/restarted repeatedly
while the libra swarm as a server keeping running.
Load keypair from given faucet_account_path then try to sync with a validator to get up - to - date faucet account ' s sequence number . Why restore faucet account : Benchmarker as a client can be stopped / restarted repeatedly while the libra swarm as a server keeping running .
fn load_faucet_account(&self, faucet_account_path: &str) -> AccountData {
        let faucet_account_keypair: KeyPair =
            load_key_from_file(faucet_account_path).expect("invalid faucet keypair file");
        let address = association_address();
        // Request and wait for account's (sequence_number, account_status) from a validator.
        // Assume Benchmarker is the ONLY active client in the libra network.
        let client = self
            .clients
            .get(0)
            .expect("no available AdmissionControlClient");
        let states = get_account_states(client, &[address]);
        let (sequence_number, status) = states
            .expect("failed to get faucet account from validator")
            .pop()
            .expect("faucet account not found");
        AccountData {
            address,
            key_pair: Some(faucet_account_keypair),
            sequence_number,
            status,
        }
    }
fn load_faucet_account ( & self , faucet_account_path : & str ) -> AccountData { let faucet_account_keypair : KeyPair = load_key_from_file ( faucet_account_path ) . expect ( " " ) ; let address = association_address ( ) ; // Request and wait for account's (sequence_number, account_status) from a validator. // Assume Benchmarker is the ONLY active client in the libra network. let client = self . clients . get ( 0 ) . expect ( " " ) ; let states = get_account_states ( client , & [ address ] ) ; let ( sequence_number , status ) = states . expect ( " " ) . pop ( ) . expect ( " " ) ; AccountData { address , key_pair : Some ( faucet_account_keypair ) , sequence_number , status , } }
Load keypair from given faucet_account_path,
then try to sync with a validator to get up-to-date faucet account's sequence number.
Load keypair from given faucet_account_path then try to sync with a validator to get up - to - date faucet account ' s sequence number .
&self
faucet_account_path
&str