From 45b110c9775f69b31e44a13c05654ae9c641bdf2 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 10 Jan 2025 01:37:10 +0200 Subject: [PATCH] Revert "Start next plotting process in a pool when one of the attempts succeeded" This reverts commit 8689b56324037758d2531fad76cee842f174165b. --- crates/subspace-farmer/src/plotter/pool.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/crates/subspace-farmer/src/plotter/pool.rs b/crates/subspace-farmer/src/plotter/pool.rs index d4d6a1b00a..b3ad2fdd7c 100644 --- a/crates/subspace-farmer/src/plotter/pool.rs +++ b/crates/subspace-farmer/src/plotter/pool.rs @@ -2,11 +2,8 @@ use crate::plotter::{Plotter, SectorPlottingProgress}; use async_trait::async_trait; -use event_listener::Event; use futures::channel::mpsc; -use futures::future; use std::any::type_name_of_val; -use std::pin::pin; use std::time::Duration; use subspace_core_primitives::sectors::SectorIndex; use subspace_core_primitives::PublicKey; @@ -21,7 +18,6 @@ use tracing::{error, trace}; pub struct PoolPlotter { plotters: Vec>, retry_interval: Duration, - notification: Event, } #[async_trait] @@ -70,7 +66,6 @@ impl Plotter for PoolPlotter { ) .await { - self.notification.notify_relaxed(1); return; } } @@ -79,11 +74,7 @@ impl Plotter for PoolPlotter { retry_interval = ?self.retry_interval, "All plotters are busy, will wait and try again later" ); - future::select( - pin!(tokio::time::sleep(self.retry_interval)), - self.notification.listen(), - ) - .await; + tokio::time::sleep(self.retry_interval).await; } } @@ -108,7 +99,6 @@ impl Plotter for PoolPlotter { ) .await { - self.notification.notify_relaxed(1); return true; } } @@ -123,7 +113,6 @@ impl PoolPlotter { Self { plotters, retry_interval, - notification: Event::new(), } } }