Skip to content

Commit

Permalink
Use bank.max_tick_height due to off-by-one for no PohRecord's clearin…
Browse files Browse the repository at this point in the history
…g bank
  • Loading branch information
ryoqun committed Oct 12, 2019
1 parent a9138d1 commit b07bf58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ mod tests {
);
let mut poh_config = PohConfig::default();
// 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);
poh_config.target_tick_count = Some(bank.max_tick_height() - 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 @@ -1223,7 +1223,7 @@ mod tests {
);
let mut poh_config = PohConfig::default();
// 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);
poh_config.target_tick_count = Some(bank.max_tick_height() - 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 b07bf58

Please sign in to comment.