diff --git a/client/src/send_and_confirm_transactions_in_parallel.rs b/client/src/send_and_confirm_transactions_in_parallel.rs index 9185ed790c39b1..f97761cba14fde 100644 --- a/client/src/send_and_confirm_transactions_in_parallel.rs +++ b/client/src/send_and_confirm_transactions_in_parallel.rs @@ -204,11 +204,21 @@ async fn send_transaction_with_rpc_fallback( ErrorKind::Io(_) | ErrorKind::Reqwest(_) => { // fall through on io error, we will retry the transaction } - ErrorKind::TransactionError(transaction_error) => { - context.error_map.insert(index, transaction_error.clone()); - return Ok(()); + ErrorKind::TransactionError(TransactionError::BlockhashNotFound) + | ErrorKind::RpcError(RpcError::RpcResponseError { + data: + RpcResponseErrorData::SendTransactionPreflightFailure( + RpcSimulateTransactionResult { + err: Some(TransactionError::BlockhashNotFound), + .. + }, + ), + .. + }) => { + // fall through so that we will resend with another blockhash } - ErrorKind::RpcError(RpcError::RpcResponseError { + ErrorKind::TransactionError(transaction_error) + | ErrorKind::RpcError(RpcError::RpcResponseError { data: RpcResponseErrorData::SendTransactionPreflightFailure( RpcSimulateTransactionResult { @@ -218,8 +228,8 @@ async fn send_transaction_with_rpc_fallback( ), .. }) => { + // if we get other than blockhash not found error the transaction is invalid context.error_map.insert(index, transaction_error.clone()); - return Ok(()); } _ => { return Err(TpuSenderError::from(e));