From aa32f7bfa34b48d5be59015fd522761475f8a2e7 Mon Sep 17 00:00:00 2001 From: Abner Zheng Date: Sun, 14 Apr 2024 13:22:23 +0800 Subject: [PATCH] fix: crash ExEx task when the ExEx future returns (#7633) Co-authored-by: Oliver Nordbjerg --- crates/node-builder/src/builder.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/node-builder/src/builder.rs b/crates/node-builder/src/builder.rs index 2c387161fb..6e05e93d05 100644 --- a/crates/node-builder/src/builder.rs +++ b/crates/node-builder/src/builder.rs @@ -627,7 +627,10 @@ where // spawn it as a crit task executor.spawn_critical("exex", async move { info!(target: "reth::cli", id, "ExEx started"); - exex.await.unwrap_or_else(|_| panic!("exex {} crashed", id)) + match exex.await { + Ok(_) => panic!("ExEx {id} finished. ExEx's should run indefinitely"), + Err(err) => panic!("ExEx {id} crashed: {err}"), + } }); }); }