Skip to content

Commit

Permalink
Address review nits
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Oct 12, 2019
1 parent cf6d0b0 commit a9138d1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,7 @@ mod tests {
mut genesis_block, ..
} = create_genesis_block(2);
genesis_block.ticks_per_slot = 4;
let num_extra_ticks = 2;
let bank = Arc::new(Bank::new(&genesis_block));
let start_hash = bank.last_blockhash();
let (verified_sender, verified_receiver) = unbounded();
Expand All @@ -1022,7 +1023,7 @@ mod tests {
Blocktree::open(&ledger_path).expect("Expected to be able to open database ledger"),
);
let mut poh_config = PohConfig::default();
poh_config.target_tick_count = Some(6);
poh_config.target_tick_count = Some(genesis_block.ticks_per_slot + num_extra_ticks);
let (exit, poh_recorder, poh_service, entry_receiver) =
create_test_recorder(&bank, &blocktree, Some(poh_config));
let cluster_info = ClusterInfo::new_with_invalid_keypair(Node::new_localhost().info);
Expand Down Expand Up @@ -1072,8 +1073,8 @@ mod tests {
Blocktree::open(&ledger_path).expect("Expected to be able to open database ledger"),
);
let mut poh_config = PohConfig::default();
// limit the tick to 1 to prevent clearing working_bank at PohRecord then PohRecorderError(MaxHeightReached) at BankingStage
poh_config.target_tick_count = Some(1);
// limit tick count to avoid clearing working_bank at PohRecord then PohRecorderError(MaxHeightReached) at BankingStage
poh_config.target_tick_count = Some(genesis_block.ticks_per_slot - 1);
let (exit, poh_recorder, poh_service, entry_receiver) =
create_test_recorder(&bank, &blocktree, Some(poh_config));
let cluster_info = ClusterInfo::new_with_invalid_keypair(Node::new_localhost().info);
Expand Down Expand Up @@ -1221,8 +1222,8 @@ mod tests {
.expect("Expected to be able to open database ledger"),
);
let mut poh_config = PohConfig::default();
// limit the tick to 1 to prevent clearing working_bank at PohRecord then PohRecorderError(MaxHeightReached) at BankingStage
poh_config.target_tick_count = Some(1);
// limit tick count to avoid clearing working_bank at PohRecord then PohRecorderError(MaxHeightReached) at BankingStage
poh_config.target_tick_count = Some(genesis_block.ticks_per_slot - 1);
let (exit, poh_recorder, poh_service, entry_receiver) =
create_test_recorder(&bank, &blocktree, Some(poh_config));
let cluster_info =
Expand Down

0 comments on commit a9138d1

Please sign in to comment.