First attempt to pull TPU into the server
This commit is contained in:
parent
5855e18a4e
commit
b826f837f8
|
@ -10,6 +10,7 @@ use std::sync::Arc;
|
|||
use std::sync::atomic::AtomicBool;
|
||||
use std::thread::JoinHandle;
|
||||
use std::time::Duration;
|
||||
//use tpu::Tpu;
|
||||
|
||||
pub struct Server {
|
||||
pub thread_hdls: Vec<JoinHandle<()>>,
|
||||
|
@ -30,6 +31,7 @@ impl Server {
|
|||
writer: W,
|
||||
) -> Self {
|
||||
let bank = Arc::new(bank);
|
||||
let mut thread_hdls = vec![];
|
||||
let rpu = Rpu::new(
|
||||
bank.clone(),
|
||||
start_hash,
|
||||
|
@ -39,11 +41,24 @@ impl Server {
|
|||
broadcast_socket,
|
||||
respond_socket,
|
||||
gossip,
|
||||
exit,
|
||||
exit.clone(),
|
||||
writer,
|
||||
);
|
||||
Server {
|
||||
thread_hdls: rpu.thread_hdls,
|
||||
}
|
||||
thread_hdls.extend(rpu.thread_hdls);
|
||||
|
||||
//let tpu = Tpu::new(
|
||||
// bank.clone(),
|
||||
// start_hash,
|
||||
// tick_duration,
|
||||
// me,
|
||||
// events_socket,
|
||||
// broadcast_socket,
|
||||
// gossip,
|
||||
// exit.clone(),
|
||||
// writer,
|
||||
//);
|
||||
//thread_hdls.extend(tpu.thread_hdls);
|
||||
|
||||
Server { thread_hdls }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ impl Tpu {
|
|||
start_hash: Hash,
|
||||
tick_duration: Option<Duration>,
|
||||
me: ReplicatedData,
|
||||
requests_socket: UdpSocket,
|
||||
events_socket: UdpSocket,
|
||||
broadcast_socket: UdpSocket,
|
||||
gossip: UdpSocket,
|
||||
exit: Arc<AtomicBool>,
|
||||
|
@ -37,7 +37,7 @@ impl Tpu {
|
|||
let packet_recycler = packet::PacketRecycler::default();
|
||||
let (packet_sender, packet_receiver) = channel();
|
||||
let t_receiver = streamer::receiver(
|
||||
requests_socket,
|
||||
events_socket,
|
||||
exit.clone(),
|
||||
packet_recycler.clone(),
|
||||
packet_sender,
|
||||
|
|
Loading…
Reference in New Issue