docs on autoconnect

This commit is contained in:
GroovieGermanikus 2023-08-08 12:11:05 +02:00
parent 3902dcca33
commit 905cb2f9ad
1 changed files with 9 additions and 0 deletions

View File

@ -8,6 +8,15 @@ use std::sync::atomic::{AtomicU32, Ordering};
use tokio::sync::RwLock;
use tracing::debug;
/// connection manager with automatic reconnect; designated for connection to Solana TPU nodes
///
/// assumptions:
/// * connection to TPU node is reliable
/// * manager and TPU nodes run both in data centers with fast internet connectivity
/// * ping times vary between 50ms and 400ms depending on the location
/// * TPU address might be wrong which then is a permanent problem
/// * the ActiveConnection instance gets renewed on leader schedule change
enum ConnectionState {
NotConnected,
Connection(Connection),