async fn send_transactions(
    test_accounts: Vec<TestAccount>,
    rpc_client: RpcClient,
    ctx: LoadTestConfig,
    rt_handle: Handle,
    tps_counter: Arc<TPSCounter>,
) -> SentTransactions {
    // Send transactions from every account.

    let join_handles = test_accounts
        .into_iter()
        .map(|account| {
            rt_handle.spawn(send_transactions_from_acc(
                account,
                ctx.clone(),
                rpc_client.clone(),
                Arc::clone(&tps_counter),
            ))
        })
        .collect::<Vec<_>>();

    // Collect all the sent transactions (so we'll be able to wait for their confirmation).
    let mut merged_txs = SentTransactions::new();
    for j in join_handles {
        let sent_txs_result = j.await.expect("Join handle panicked");

        match sent_txs_result {
            Ok(sent_txs) => merged_txs.merge(sent_txs),
            Err(err) => log::warn!("Failed to send txs: {}", err),
        }
    }

    merged_txs
}
// Sends the configured deposits, withdraws and transfers from each account concurrently.
Sends the configured deposits, withdraws and transfers from each account concurrently.
Sends the configured deposits withdraws and transfers from each account concurrently .
async fn send_transactions(
    test_accounts: Vec<TestAccount>,
    rpc_client: RpcClient,
    ctx: LoadTestConfig,
    rt_handle: Handle,
    tps_counter: Arc<TPSCounter>,
) -> SentTransactions {
    // Send transactions from every account.
    let join_handles = test_accounts
        .into_iter()
        .map(|account| {
            rt_handle.spawn(send_transactions_from_acc(
                account,
                ctx.clone(),
                rpc_client.clone(),
                Arc::clone(&tps_counter),
            ))
        })
        .collect::<Vec<_>>();
    // Collect all the sent transactions (so we'll be able to wait for their confirmation).
    let mut merged_txs = SentTransactions::new();
    for j in join_handles {
        let sent_txs_result = j.await.expect("Join handle panicked");
        match sent_txs_result {
            Ok(sent_txs) => merged_txs.merge(sent_txs),
            Err(err) => log::warn!("Failed to send txs: {}", err),
        }
    }
    merged_txs
}
async fn send_transactions ( test_accounts : Vec < TestAccount > , rpc_client : RpcClient , ctx : LoadTestConfig , rt_handle : Handle , tps_counter : Arc < TPSCounter > , ) -> SentTransactions { // Send transactions from every account. let join_handles = test_accounts . into_iter ( ) . map ( | account | { rt_handle . spawn ( send_transactions_from_acc ( account , ctx . clone ( ) , rpc_client . clone ( ) , Arc :: clone ( & tps_counter ) , ) ) } ) . collect :: < Vec < _ > > ( ) ; // Collect all the sent transactions (so we'll be able to wait for their confirmation). let mut merged_txs = SentTransactions :: new ( ) ; for j in join_handles { let sent_txs_result = j . await . expect ( " " ) ; match sent_txs_result { Ok ( sent_txs ) => merged_txs . merge ( sent_txs ) , Err ( err ) => log :: warn ! ( " " err ) , } } merged_txs }
Sends the configured deposits, withdraws and transfers from each account concurrently.
Sends the configured deposits withdraws and transfers from each account concurrently .
test_accounts
Vec<TestAccount>
rpc_client
RpcClient
ctx
LoadTestConfig
rt_handle
Handle
tps_counter
Arc<TPSCounter>