diff --git a/timeboost-sequencer/src/include.rs b/timeboost-sequencer/src/include.rs index 01146d56..fa271258 100644 --- a/timeboost-sequencer/src/include.rs +++ b/timeboost-sequencer/src/include.rs @@ -67,13 +67,13 @@ impl Includer { self.round = round; + // Ensure cache has an entry for this round. + self.cache.entry(self.round).or_default(); + while self.cache.len() > CACHE_SIZE { self.cache.pop_first(); } - // Ensure cache has an entry for this round. - self.cache.entry(self.round).or_default(); - self.time = { let mut times = lists .iter()