Skip to content

Commit 9788876

Browse files
committed
fix: filter bundles on insertion
1 parent f53035e commit 9788876

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tasks/cache/task.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ impl CacheTask {
5555
}
5656
}
5757
Some(bundle) = self.bundles.recv() => {
58+
let block_num = self.envs.borrow().as_ref().map(|e| e.rollup_env().number.to::<u64>()).unwrap_or_default();
59+
if block_num != bundle.bundle.block_number() {
60+
debug!(env.block = block_num, bundle.block = bundle.bundle.block_number(), "skipping bundle insert");
61+
continue;
62+
}
63+
5864
let res = cache.add_bundle(bundle.bundle, basefee);
5965
// Skip bundles that fail to be added to the cache
6066
if let Err(e) = res {

0 commit comments

Comments
 (0)