Skip to content

Commit

Permalink
Revert "send transaction without config"
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit authored Oct 26, 2023
1 parent ed98c67 commit 544b9e2
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions consumer/src/solana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,25 +297,31 @@ impl Solana {
message,
};

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 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 recent_blockhash = transaction.get_recent_blockhash();

Expand Down

0 comments on commit 544b9e2

Please sign in to comment.