From 4fcea987c6345b672e462d8796461d15de3e37ff Mon Sep 17 00:00:00 2001 From: imabdulbasit Date: Tue, 24 Oct 2023 19:02:35 +0500 Subject: [PATCH] send transaction without config --- consumer/src/solana.rs | 44 ++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/consumer/src/solana.rs b/consumer/src/solana.rs index 69d2f06..e2c1982 100644 --- a/consumer/src/solana.rs +++ b/consumer/src/solana.rs @@ -297,31 +297,25 @@ impl Solana { message, }; - 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(_) - ) - }) - .notify(|err: &ClientError, dur: Duration| { - error!( - "failed to send transaction retrying error {:?} in {:?}", - err, dur - ); - }) - .await - .map_err(|e| { - let msg = format!("failed to send transaction: {e}"); - error!(msg); - anyhow!(msg) - })?; + let signature = with_retry!(self.rpc().send_transaction(&transaction)) + .when(|e| { + !matches!( + e.kind, + ClientErrorKind::TransactionError(_) | ClientErrorKind::SigningError(_) + ) + }) + .notify(|err: &ClientError, dur: Duration| { + error!( + "failed to send transaction retrying error {:?} in {:?}", + err, dur + ); + }) + .await + .map_err(|e| { + let msg = format!("failed to send transaction: {e}"); + error!(msg); + anyhow!(msg) + })?; let recent_blockhash = transaction.get_recent_blockhash();