wip
This commit is contained in:
parent
c9c6b7b98e
commit
391a42ec22
|
@ -112,11 +112,11 @@ async fn accept_client_connection(client_connection: Connection, tpu_quic_client
|
|||
let maybe_stream = client_connection.accept_uni().await;
|
||||
let mut recv_stream = match maybe_stream {
|
||||
Err(quinn::ConnectionError::ApplicationClosed(reason)) => {
|
||||
debug!("connection closed by peer - reason: {:?}", reason);
|
||||
debug!("connection closed by client - reason: {:?}", reason);
|
||||
if reason.error_code != VarInt::from_u32(0) {
|
||||
return Err(anyhow!("connection closed by peer with unexpected reason: {:?}", reason));
|
||||
return Err(anyhow!("connection closed by client with unexpected reason: {:?}", reason));
|
||||
}
|
||||
debug!("connection gracefully closed by peer");
|
||||
debug!("connection gracefully closed by client");
|
||||
return Ok(());
|
||||
},
|
||||
Err(e) => {
|
||||
|
|
|
@ -214,9 +214,11 @@ impl QuicConnectionUtils {
|
|||
}
|
||||
}
|
||||
Err(elapsed) => {
|
||||
warn!("timeout sending transactions")
|
||||
warn!("timeout sending transactions");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// TODO wrap in timeout
|
||||
stream.unwrap().finish().await.unwrap();
|
||||
|
|
|
@ -12,6 +12,7 @@ use futures::FutureExt;
|
|||
use itertools::Itertools;
|
||||
use log::{debug, error, info, warn};
|
||||
use quinn::{ClientConfig, Connection, Endpoint, EndpointConfig, IdleTimeout, TokioRuntime, TransportConfig};
|
||||
use solana_sdk::packet::PACKET_DATA_SIZE;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signer::Signer;
|
||||
use solana_sdk::signature::Keypair;
|
||||
|
@ -173,14 +174,15 @@ impl QuicProxyConnectionManager {
|
|||
|
||||
let mut txs = vec![first_tx];
|
||||
// TODO comment in
|
||||
// for _ in 1..number_of_transactions_per_unistream {
|
||||
// if let Ok((signature, tx)) = transaction_receiver.try_recv() {
|
||||
// // if Self::check_for_confirmation(&txs_sent_store, signature) {
|
||||
// // continue;
|
||||
// // }
|
||||
// txs.push(tx);
|
||||
// }
|
||||
// }
|
||||
let foo = PACKET_DATA_SIZE;
|
||||
for _ in 1..number_of_transactions_per_unistream {
|
||||
if let Ok((signature, tx)) = transaction_receiver.try_recv() {
|
||||
// if Self::check_for_confirmation(&txs_sent_store, signature) {
|
||||
// continue;
|
||||
// }
|
||||
txs.push(tx);
|
||||
}
|
||||
}
|
||||
|
||||
let tpu_fanout_nodes = current_tpu_nodes.read().await.clone();
|
||||
|
||||
|
|
Loading…
Reference in New Issue