Skip to content

Commit

Permalink
skip preflight for rpc client (#3940)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillLykov authored Dec 7, 2024
1 parent 48e8cf5 commit 00880ab
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tps-client/src/rpc_client.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use {
crate::{TpsClient, TpsClientError, TpsClientResult},
solana_client::rpc_config::RpcSendTransactionConfig,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::config::RpcBlockConfig,
solana_sdk::{
Expand All @@ -18,7 +19,15 @@ use {

impl TpsClient for RpcClient {
fn send_transaction(&self, transaction: Transaction) -> TpsClientResult<Signature> {
RpcClient::send_transaction(self, &transaction).map_err(|err| err.into())
RpcClient::send_transaction_with_config(
self,
&transaction,
RpcSendTransactionConfig {
skip_preflight: true,
..Default::default()
},
)
.map_err(|err| err.into())
}

fn send_batch(&self, transactions: Vec<Transaction>) -> TpsClientResult<()> {
Expand Down

0 comments on commit 00880ab

Please sign in to comment.