From 00880abeeda6d8198a325277563af6894efacebc Mon Sep 17 00:00:00 2001 From: kirill lykov Date: Sat, 7 Dec 2024 10:18:16 +0100 Subject: [PATCH] skip preflight for rpc client (#3940) --- tps-client/src/rpc_client.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tps-client/src/rpc_client.rs b/tps-client/src/rpc_client.rs index 310272ac43f928..0487b0837237bb 100644 --- a/tps-client/src/rpc_client.rs +++ b/tps-client/src/rpc_client.rs @@ -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::{ @@ -18,7 +19,15 @@ use { impl TpsClient for RpcClient { fn send_transaction(&self, transaction: Transaction) -> TpsClientResult { - 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) -> TpsClientResult<()> {