1) Switch broken tests to generate an empty tick in their ledgers to use as last_id, 2) Fix bug where PoH generator in BankingStage did not referenced the last tick instead of the last entry on startup, causing ledger verification to fail on the new tick added by the PoH generator (#1479)

This commit is contained in:
carllin
2018-10-12 00:39:10 -07:00
committed by GitHub
parent 9dd4dc2088
commit 47f69f2d24
12 changed files with 212 additions and 97 deletions

View File

@ -575,11 +575,13 @@ mod tests {
let leader_data = leader.info.clone();
let ledger_path = tmp_ledger("client_check_signature", &alice);
let genesis_entries = &alice.create_entries();
let entry_height = genesis_entries.len() as u64;
let server = Fullnode::new_with_bank(
leader_keypair,
bank,
0,
&[],
entry_height,
&genesis_entries,
leader,
None,
&ledger_path,
@ -636,11 +638,13 @@ mod tests {
let leader_data = leader.info.clone();
let ledger_path = tmp_ledger("zero_balance_check", &alice);
let genesis_entries = &alice.create_entries();
let entry_height = genesis_entries.len() as u64;
let server = Fullnode::new_with_bank(
leader_keypair,
bank,
0,
&[],
entry_height,
&genesis_entries,
leader,
None,
&ledger_path,