Skip to content

Commit

Permalink
Merge pull request #77 from holaplex/abdul/skip-preflight
Browse files Browse the repository at this point in the history
skip preflight
  • Loading branch information
imabdulbasit authored Oct 11, 2023
2 parents f90ed98 + f10a12a commit f9c3060
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 f9c3060

Please sign in to comment.