Optimize TpuConnection and its implementations and refactor connection-cache to not use dyn in order to enable those changes (#23877)

This commit is contained in:
ryleung-solana
2022-03-24 11:40:26 -04:00
committed by GitHub
parent 5b916961b5
commit 82945ba973
11 changed files with 266 additions and 48 deletions

View File

@@ -613,7 +613,7 @@ impl<C: 'static + TpuConnection> AsyncClient for ThinClient<C> {
fn async_send_batch(&self, transactions: Vec<Transaction>) -> TransportResult<()> {
let batch: Vec<VersionedTransaction> = transactions.into_iter().map(Into::into).collect();
self.tpu_connection()
.par_serialize_and_send_transaction_batch(&batch)?;
.par_serialize_and_send_transaction_batch(&batch[..])?;
Ok(())
}