Skip to content

Commit

Permalink
Clarify constant
Browse files Browse the repository at this point in the history
  • Loading branch information
joncinque committed Mar 21, 2024
1 parent 0055b8b commit 47df480
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/send_and_confirm_transactions_in_parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,12 @@ async fn confirm_transactions_till_block_height_and_resend_unexpired_transaction
.map(|x| x.serialized_transaction.clone())
.collect::<Vec<_>>();
let num_txs_to_resend = txs_to_resend_over_tpu.len();
// This is a "reasonable" constant for how long it should
// take to fan the transactions out, taken from
// `solana_tpu_client::nonblocking::tpu_client::send_wire_transaction_futures`
const SEND_TIMEOUT_INTERVAL: Duration = Duration::from_secs(5);
let message = if tokio::time::timeout(
Duration::from_secs(5),
SEND_TIMEOUT_INTERVAL,
tpu_client.try_send_wire_transaction_batch(txs_to_resend_over_tpu),
)
.await
Expand Down

0 comments on commit 47df480

Please sign in to comment.