2023-03-01 18:38:11 -08:00
|
|
|
use {
|
2024-01-17 14:19:32 -08:00
|
|
|
crate::repair::{outstanding_requests, serve_repair},
|
2023-03-01 18:38:11 -08:00
|
|
|
solana_gossip::cluster_info::ClusterInfo,
|
|
|
|
solana_runtime::bank_forks::BankForks,
|
2023-12-07 22:53:19 -08:00
|
|
|
solana_sdk::{pubkey::Pubkey, quic::NotifyKeyUpdate},
|
2023-03-01 18:38:11 -08:00
|
|
|
std::{
|
|
|
|
collections::HashSet,
|
2024-01-17 14:19:32 -08:00
|
|
|
net::UdpSocket,
|
2023-03-01 18:38:11 -08:00
|
|
|
sync::{Arc, RwLock},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
|
pub struct AdminRpcRequestMetadataPostInit {
|
|
|
|
pub cluster_info: Arc<ClusterInfo>,
|
|
|
|
pub bank_forks: Arc<RwLock<BankForks>>,
|
|
|
|
pub vote_account: Pubkey,
|
|
|
|
pub repair_whitelist: Arc<RwLock<HashSet<Pubkey>>>,
|
2023-12-07 22:53:19 -08:00
|
|
|
pub notifies: Vec<Arc<dyn NotifyKeyUpdate + Sync + Send>>,
|
2024-01-17 14:19:32 -08:00
|
|
|
pub repair_socket: Arc<UdpSocket>,
|
|
|
|
pub outstanding_repair_requests:
|
|
|
|
Arc<RwLock<outstanding_requests::OutstandingRequests<serve_repair::ShredRepairType>>>,
|
2023-03-01 18:38:11 -08:00
|
|
|
}
|