Skip to content

Commit

Permalink
skip preflight
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit committed Oct 11, 2023
1 parent 86f0194 commit f10a12a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion consumer/src/solana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use mpl_token_metadata::{
use solana_client::{
client_error::{ClientError, ClientErrorKind},
rpc_client::RpcClient as SolanaRpcClient,
rpc_config::RpcSendTransactionConfig,
rpc_request::RpcError,
};
use solana_program::{
Expand Down Expand Up @@ -270,7 +271,9 @@ impl Solana {
message,
};

let signature = with_retry!(self.rpc().send_transaction(&transaction))
let signature = with_retry!(self.rpc().send_transaction_with_config(&transaction, RpcSendTransactionConfig {
skip_preflight: true, ..Default::default()
}))
.when(|e| {
!matches!(e.kind, ClientErrorKind::TransactionError(_) | ClientErrorKind::SigningError(_)| ClientErrorKind::RpcError(RpcError::RpcResponseError {
data: solana_client::rpc_request::RpcResponseErrorData::SendTransactionPreflightFailure(_),
Expand Down

0 comments on commit f10a12a

Please sign in to comment.