From 7bf36bdd08b6df382e2e4e4840e80474c6cd944c Mon Sep 17 00:00:00 2001 From: Leo-Besancon Date: Fri, 2 Aug 2024 16:18:37 +0200 Subject: [PATCH] Validate that hd_cache_size >= snip_amount (#4732) --- massa-execution-worker/src/worker.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/massa-execution-worker/src/worker.rs b/massa-execution-worker/src/worker.rs index 332ac92f25e..5fee6e65eac 100644 --- a/massa-execution-worker/src/worker.rs +++ b/massa-execution-worker/src/worker.rs @@ -260,6 +260,10 @@ pub fn start_execution_worker( massa_metrics: MassaMetrics, #[cfg(feature = "dump-block")] block_storage_backend: Arc>, ) -> (Box, Box) { + if config.hd_cache_size < config.snip_amount { + panic!("In config.toml, hd_cache_size must be greater than snip_amount"); + } + // create an execution state let execution_state = Arc::new(RwLock::new(ExecutionState::new( config.clone(),