Synchronize PoH, bank last_id queue and ledger entry channel.

PoH, bank's last_id queue and the Entry channel need to have a synchronized order of ids.
This commit is contained in:
Anatoly Yakovenko
2018-09-26 05:52:13 -07:00
committed by Grimes
parent 718031ec35
commit 93c4f6c9b8
8 changed files with 307 additions and 513 deletions

View File

@ -316,14 +316,11 @@ impl Fullnode {
}
None => {
// Start in leader mode.
let tick_duration = None;
// TODO: To light up PoH, uncomment the following line:
//let tick_duration = Some(Duration::from_millis(1000));
let (tpu, entry_receiver, tpu_exit) = Tpu::new(
keypair.clone(),
&bank,
&crdt,
tick_duration,
Default::default(),
node.sockets
.transaction
.iter()
@ -430,14 +427,11 @@ impl Fullnode {
fn validator_to_leader(&mut self, entry_height: u64) {
self.crdt.write().unwrap().set_leader(self.keypair.pubkey());
let tick_duration = None;
// TODO: To light up PoH, uncomment the following line:
//let tick_duration = Some(Duration::from_millis(1000));
let (tpu, blob_receiver, tpu_exit) = Tpu::new(
self.keypair.clone(),
&self.bank,
&self.crdt,
tick_duration,
Default::default(),
self.transaction_sockets
.iter()
.map(|s| s.try_clone().expect("Failed to clone transaction sockets"))