Skip to content

Commit

Permalink
Validate that hd_cache_size >= snip_amount (#4732)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Besancon authored Aug 2, 2024
1 parent 2cfad9e commit 7bf36bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions massa-execution-worker/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ pub fn start_execution_worker(
massa_metrics: MassaMetrics,
#[cfg(feature = "dump-block")] block_storage_backend: Arc<RwLock<dyn StorageBackend>>,
) -> (Box<dyn ExecutionManager>, Box<dyn ExecutionController>) {
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(),
Expand Down

0 comments on commit 7bf36bd

Please sign in to comment.