Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solana program deployment failed because blockhash was expired during… #34621

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions client/src/send_and_confirm_transactions_in_parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,21 @@ fn progress_from_context_and_block_height(
}
}

fn add_transaction_error_in_context(
context: &SendingContext,
transaction_error: &TransactionError,
index: usize,
) {
match transaction_error {
TransactionError::BlockhashNotFound => {
// fall through so that we will resend with another blockhash
}
_ => {
context.error_map.insert(index, transaction_error.clone());
}
}
}

async fn send_transaction_with_rpc_fallback(
rpc_client: &RpcClient,
tpu_client: &Option<QuicTpuClient>,
Expand All @@ -205,8 +220,7 @@ async fn send_transaction_with_rpc_fallback(
// fall through on io error, we will retry the transaction
godmodegalactus marked this conversation as resolved.
Show resolved Hide resolved
}
ErrorKind::TransactionError(transaction_error) => {
context.error_map.insert(index, transaction_error.clone());
return Ok(());
add_transaction_error_in_context(context, transaction_error, index);
}
ErrorKind::RpcError(RpcError::RpcResponseError {
data:
Expand All @@ -218,8 +232,7 @@ async fn send_transaction_with_rpc_fallback(
),
..
}) => {
context.error_map.insert(index, transaction_error.clone());
return Ok(());
add_transaction_error_in_context(context, transaction_error, index);
}
_ => {
return Err(TpuSenderError::from(e));
Expand Down