Skip to content

Commit

Permalink
Fix flaky unittest, should use timestamp of the Gossip message. (#2893)
Browse files Browse the repository at this point in the history
  • Loading branch information
wen-coding committed Sep 11, 2024
1 parent edda97e commit 37671df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wen-restart/src/last_voted_fork_slots_aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,10 @@ mod tests {
[initial_num_active_validators + 2]
.node_keypair
.pubkey();
let now = timestamp();
let super_old_validator_last_voted_slots = RestartLastVotedForkSlots::new(
super_old_validator,
timestamp(),
now,
&[root_slot - 1],
Hash::default(),
SHRED_VERSION,
Expand All @@ -506,7 +507,7 @@ mod tests {
last_voted_fork_slots: vec![],
last_vote_bankhash: Hash::default().to_string(),
shred_version: SHRED_VERSION as u32,
wallclock: timestamp(),
wallclock: now,
}),
);
assert_eq!(
Expand Down

0 comments on commit 37671df

Please sign in to comment.