Fix potential of checking tvu bank for truth when its behind (#2614)

* Fix race between tpu and tvu, where tvu bank is not caught up to tpu bank

* Add test

* Cleanup Fullnode tests
This commit is contained in:
carllin
2019-01-31 19:21:02 -08:00
committed by GitHub
parent 3f323aba1a
commit 37003da854
7 changed files with 230 additions and 100 deletions

View File

@@ -1266,9 +1266,9 @@ fn run_node(id: Pubkey, mut fullnode: Fullnode, should_exit: Arc<AtomicBool>) ->
fullnode.validator_to_leader(tick_height, entry_height, last_entry_id);
}
Err(_) => match should_be_fwdr {
Ok(TpuReturnType::LeaderRotation) => {
Ok(TpuReturnType::LeaderRotation(tick_height)) => {
fullnode
.leader_to_validator()
.leader_to_validator(tick_height)
.expect("failed when transitioning to validator");
}
Err(_) => {