Solana program deployment failed because blockhash was expired during… (#34621)
* Solana program deployment failed because blockhash was expired during simulation, So we ignore these types of errors as we are going to retry with new blockhash anyways * Creating a single pattern matching after jon's review
This commit is contained in:
parent
b8144979dc
commit
bbb4118ac4
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue