Replay Stage start_leader() can use wrong parent fork() (#3238)

*  Make sure start_leader starts on the last voted block, not necessarily the biggest indexed bank in frozen_slots()

* Fix tvu test
This commit is contained in:
carllin
2019-03-12 17:42:53 -07:00
committed by GitHub
parent 76feb2098e
commit cb3eeace56
7 changed files with 147 additions and 130 deletions

View File

@@ -110,7 +110,8 @@ mod tests {
let (genesis_block, _mint_keypair) = GenesisBlock::new(2);
let bank = Arc::new(Bank::new(&genesis_block));
let prev_hash = bank.last_blockhash();
let (poh_recorder, entry_receiver) = PohRecorder::new(bank.tick_height(), prev_hash);
let (poh_recorder, entry_receiver) =
PohRecorder::new(bank.tick_height(), prev_hash, bank.slot());
let poh_recorder = Arc::new(Mutex::new(poh_recorder));
let exit = Arc::new(AtomicBool::new(false));
let working_bank = WorkingBank {