From 906636b5267ebfd946cb2b188a582aa32d3f4129 Mon Sep 17 00:00:00 2001 From: Bing-Yang Lin Date: Sun, 19 Jan 2025 15:39:41 +0800 Subject: [PATCH] Fix one more possible crash in execution_driver --- crates/iota-core/src/execution_driver.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/iota-core/src/execution_driver.rs b/crates/iota-core/src/execution_driver.rs index ea3bf455fba..8672bcc5b09 100644 --- a/crates/iota-core/src/execution_driver.rs +++ b/crates/iota-core/src/execution_driver.rs @@ -87,6 +87,16 @@ pub async fn execution_process( let digest = *certificate.digest(); trace!(?digest, "Pending certificate execution activated."); + if epoch_store.epoch() != certificate.epoch() { + info!( + ?digest, + cur_epoch = epoch_store.epoch(), + cert_epoch = certificate.epoch(), + "Ignoring certificate from previous epoch." + ); + continue; + } + let limit = limit.clone(); // hold semaphore permit until task completes. unwrap ok because we never close // the semaphore in this context.