|
1 |
| -use crate::CommandResult; |
2 |
| - |
3 | 1 | /// The `bench` subcommand
|
4 | 2 | use {
|
5 |
| - crate::{ |
6 |
| - config::Config, owner_address_arg, |
7 |
| - rpc_client_utils::send_and_confirm_messages_with_spinner, Error, |
8 |
| - }, |
| 3 | + crate::{config::Config, owner_address_arg, CommandResult, Error}, |
9 | 4 | clap::{value_t_or_exit, App, AppSettings, Arg, ArgMatches, SubCommand},
|
10 | 5 | solana_clap_utils::{
|
11 | 6 | input_parsers::pubkey_of_signer,
|
12 | 7 | input_validators::{is_amount, is_parsable, is_valid_pubkey},
|
13 | 8 | },
|
14 |
| - solana_client::rpc_client::RpcClient, |
| 9 | + solana_client::{ |
| 10 | + rpc_client::RpcClient, |
| 11 | + tpu_client::{TpuClient, TpuClientConfig}, |
| 12 | + }, |
15 | 13 | solana_remote_wallet::remote_wallet::RemoteWalletManager,
|
16 | 14 | solana_sdk::{
|
17 | 15 | message::Message, native_token::Sol, program_pack::Pack, pubkey::Pubkey, signature::Signer,
|
@@ -461,12 +459,13 @@ fn send_messages(
|
461 | 459 | crate::check_fee_payer_balance(config, lamports_required)?;
|
462 | 460 |
|
463 | 461 | let start = Instant::now();
|
464 |
| - let transaction_errors = send_and_confirm_messages_with_spinner( |
| 462 | + let tpu_client = TpuClient::new( |
465 | 463 | config.rpc_client.clone(),
|
466 | 464 | &config.websocket_url,
|
467 |
| - messages, |
468 |
| - &signers, |
| 465 | + TpuClientConfig::default(), |
469 | 466 | )?;
|
| 467 | + let transaction_errors = |
| 468 | + tpu_client.send_and_confirm_messages_with_spinner(messages, &signers)?; |
470 | 469 |
|
471 | 470 | for (i, transaction_error) in transaction_errors.into_iter().enumerate() {
|
472 | 471 | if let Some(transaction_error) = transaction_error {
|
|
0 commit comments