Connect TPU's broadcast service with TVU's blob fetch stage (#2587)

* Connect TPU's broadcast service with TVU's blob fetch stage

- This is needed since ledger is being written only in TVU now

* fix clippy warnings

* fix failing test

* fix broken tests

* fixed failing tests
This commit is contained in:
Pankaj Garg
2019-01-31 13:43:22 -08:00
committed by GitHub
parent 2dd20c38b2
commit 32162ef0f1
9 changed files with 80 additions and 31 deletions

View File

@ -11,6 +11,7 @@ use crate::rpc::JsonRpcService;
use crate::rpc_pubsub::PubSubService;
use crate::service::Service;
use crate::storage_stage::StorageState;
use crate::streamer::BlobSender;
use crate::tpu::{Tpu, TpuReturnType};
use crate::tvu::{Sockets, Tvu, TvuReturnType};
use crate::vote_signer_proxy::VoteSignerProxy;
@ -100,6 +101,7 @@ pub struct Fullnode {
broadcast_socket: UdpSocket,
pub node_services: NodeServices,
pub role_notifiers: (TvuRotationReceiver, TpuRotationReceiver),
blob_sender: BlobSender,
}
impl Fullnode {
@ -219,7 +221,7 @@ impl Fullnode {
let (to_leader_sender, to_leader_receiver) = channel();
let (to_validator_sender, to_validator_receiver) = channel();
let tvu = Tvu::new(
let (tvu, blob_sender) = Tvu::new(
vote_signer_option,
&bank,
entry_height,
@ -257,6 +259,7 @@ impl Fullnode {
id,
scheduled_leader == id,
&to_validator_sender,
&blob_sender,
);
inc_new_counter_info!("fullnode-new", 1);
@ -274,6 +277,7 @@ impl Fullnode {
tpu_sockets: node.sockets.tpu,
broadcast_socket: node.sockets.broadcast,
role_notifiers: (to_leader_receiver, to_validator_receiver),
blob_sender,
}
}
@ -333,6 +337,7 @@ impl Fullnode {
&last_id,
self.id,
&to_validator_sender,
&self.blob_sender,
)
}