diff --git a/node/src/components/deploy_buffer.rs b/node/src/components/deploy_buffer.rs index f78ce73858..643a9d1638 100644 --- a/node/src/components/deploy_buffer.rs +++ b/node/src/components/deploy_buffer.rs @@ -214,10 +214,6 @@ impl DeployBuffer { /// Update buffer considering new stored deploy. fn register_deploy(&mut self, deploy: Deploy) { let deploy_hash = deploy.hash(); - if deploy.is_valid().is_err() { - error!(%deploy_hash, "DeployBuffer: invalid deploy must not be buffered"); - return; - } if self.dead.contains(deploy_hash) { info!(%deploy_hash, "DeployBuffer: attempt to register already dead deploy"); return; diff --git a/node/src/components/deploy_buffer/tests.rs b/node/src/components/deploy_buffer/tests.rs index 10e4a64098..1b39495056 100644 --- a/node/src/components/deploy_buffer/tests.rs +++ b/node/src/components/deploy_buffer/tests.rs @@ -67,16 +67,6 @@ fn create_valid_deploys( deploys } -fn create_invalid_deploys(rng: &mut TestRng, size: usize) -> Vec { - let mut deploys = create_valid_deploys(rng, size, DeployType::Random, None, None); - - for deploy in deploys.iter_mut() { - deploy.invalidate(); - } - - deploys -} - /// Checks sizes of the deploy_buffer containers. Also checks the metrics recorded. #[track_caller] fn assert_container_sizes( @@ -147,14 +137,6 @@ fn register_deploy_and_check_size() { .for_each(|deploy| deploy_buffer.register_deploy(deploy.clone())); assert_container_sizes(&deploy_buffer, valid_deploys.len(), 0, 0); - // Try to register invalid deploys - let num_invalid_deploys: usize = rng.gen_range(10..100); - let invalid_deploys = create_invalid_deploys(&mut rng, num_invalid_deploys); - invalid_deploys - .iter() - .for_each(|deploy| deploy_buffer.register_deploy(deploy.clone())); - assert_container_sizes(&deploy_buffer, valid_deploys.len(), 0, 0); - // Try to register a duplicate deploy let duplicate_deploy = valid_deploys .get(rng.gen_range(0..num_valid_deploys))