Skip to content

Commit

Permalink
Wen restart fix flaky test (#3525)
Browse files Browse the repository at this point in the history
* Fix flaky test, make sure bank is frozen before reading bankhash.

* Add more comments here.
  • Loading branch information
wen-coding authored Nov 7, 2024
1 parent 7688d91 commit 5abb627
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wen-restart/src/wen_restart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1817,8 +1817,11 @@ mod tests {
.unwrap()
.get(my_heaviest_fork_slot)
{
my_heaviest_fork_bankhash = bank.hash();
break;
// When deciding the local heaviest fork, we will freeze the bank.
if bank.is_frozen() {
my_heaviest_fork_bankhash = bank.hash();
break;
}
}
sleep(Duration::from_millis(100));
}
Expand Down

0 comments on commit 5abb627

Please sign in to comment.